Each of the rooms had a clue to point to the correct room to go back to. That's why there was a hint.