How did Pinocchio figure out he was made of wood?

His hand caught fire.