Ilya's logical tests

This problem was offered at the Moscow Institute of Physics & Technology math olympiad.

Ali-baba stands in front of the cave with treasures. By the entrance he finds a four-sectional rotating table, each section having a sign engraved on it. Each section's sign can be either a plus or a minus. A sign becomes visible upon placing a hand on it and can be changed by will while the hand remains on it. Ali-baba may place his two hands on two sections of the table, see the signs and change one or both to their opposites if he so wishes. After that, he must withdraw his hands. The table then quickly rotates and stops. Rotation is so fast that Ali-baba does not know the new positions of the sections relative to their old positions. Once the table stops, Ali-baba may repeat the whole process. When all four signs are the same, the cave with treasures will open. Ali-baba has already spent some time trying to open the cave, apparently without luck. The old legend says that one needs not luck but wisdom to get all the signs to be the same. Help Ali-baba.