Riddle. 4.- A man is at the beginning of a long hallway that has three switches; at the end of the hallway there is a room with a closed door.

One of the switches turns on the light of the room, which is turned off.

How could he know which switch turns on the light if he just went through the hallway once?

Hint: The man has a flashlight.