Once again, you have angered the Emperor, and she has imprisoned you in a special prison.
“I do have a bit of good news for you,” the Emperor has told you. “You're only two doors away from freedom, and I've left all the doors unlocked for you!” Of course, she neglected to mention the details.
So here are the details. From the main part of your prison suite, you can walk into a very long hallway. The hallway runs east and west, and on the north side of the hallway, there are 2,001 doors. (Evidently, the Emperor really, really likes doors.) Each door leads into another very long hallway, running north and south. The north–south hallways are so long that it takes about half an hour to walk from one end to the other. At the north end of each of these hallways is another door.
At the north end of one of these hallways, the door leads to freedom. At the north end of each of the other hallways, though, the door simply leads to a dead-end room. The dead-end room has two doors, both on the south side. One door leads to the hallway you just came from (obviously), and the other door leads to the adjacent hallway.
You have access to some simple supplies: pencils, paper, sticky tape, scissors, and plenty of string. (Of course, you probably won't need all of them. Maybe you won't need any of them.)
How are you going to get out? If you try doors at random, it could take you hundreds of hours to find the right one.
Ah, but you've just thought of something. You've figured out a way to escape from the prison in under a week, guaranteed.
What is it?