You are one of 4 prisoners. Tomorrow will be a deciding day: the warden has told you and your cellmates that you can all go free, or all be executed, depending on how you answer tomorrow's challenge. He was kind enough to let you and your cellmates plan ahead a strategy. Tomorrow's challenge goes as follows:
Each of you will be given a hat with a number. You will see your cellmates' hat numbers, but not your own. Each cellmate's hat will have a unique number (no duplicates). You don't know how small or big the numbers might be, but they will be integer numbers greater than 0. You will not be allowed to communicate when the hats are put in place.
You will be given a sheet of paper in which you can write a number, and only a number - no punctuation or letters allowed. The warden will rewrite the number in his own handwriting, and remove zeroes to the left.
Then, he will collect those numbers, scramble them and redistribute, such that no prisoner gets their own written number back. You may all go free if, and only if, you and your cellmates guess your own hat's number.
Can you figure out a strategy which guarantees that each prisoner can guess their own hat's number?
Note: I don't have an answer in mind. I'll keep trying to figure out this puzzle alongside.