Let us mark the switches as "A", "B" and "C".
Press the switch "A" to the "on" position and keep it in this position for several minutes (say five minutes). After that put it in the "off" position. Immediately put switch "B" in the "on" position and, now, rush to the roof top.
Touch each of the bulbs. The bulb which is not lighted and is cold to the touch, corresponds to switch "C". The bulb which is not lighted but is warm to the touch corresponds to switch "A" and the bulb which is lighted corresponds to switch "B".