As mentioned above, the second player in the two person game can force a win by playing perfectly.
The problem in the three person game is that there are 2 losers. Lets say that the three players are $A, B,$ and $C$ and there exists a perfect strategy for one of them to win. WLOG, lets say that this is $A$ (note we don't know who needs to go first for this to happen).
For $A$ to win, player $B$ will need to lose first making it player $C$'s turn in the final round. Thus, to make player $B$ lose, player $A$ will need to write $9$, or $8,9$. In order to do this, player $C$ will need to write $7$ or $8$. To force player $C$ to write $7$ or $8$, player $B$ will need to write $6$.
The problem is that we can't force player $B$ to write $6$. We can either end on $4$ or $5$, giving $B$ the option of writing $6$, or of writing $5$ or $7$, depending on what we give them. In fact, knowing that by writing $6$, $B$ will lose, $B$ will probably choose to write another number. $B$ may still lose, but losing to $C$ is equivalent to losing to $A$, so there is no motivation to play along with any strategy of $A$'s.
Lets say that in this situation, $A$ wrote a $5$. Knowing that writing a $6$ will lose, $B$ will write both $6$ and $7$. This hands the victory to $C$ since $C$ can now write $8$ and $9$, making $A$ drop out. $B$ goes next in the 2 person game, so $C$ wins.
If instead $A$ wrote a $4$, again, $B$ would know that writing a $6$ is death. So instead, $B$ may choose to write only $5$. But as we saw above, writing a $5$ will cause that player to be eliminated, and this would hand the win one the other two players.
Thus, if given the option to pick between $5, 6,$ or $7$, $B$ won't care because they all result in losses.
If we changed the rules to have a ranking where finishing later is better, then we could probably come up with a generic strategy for the 3 person game and extend it further.
With the Rule Change
Lets revisit the 3 person game with the new change that a player would rather come in second than lose.
3 Player Game
Players are $A,B,$ and $C$.
The following are the results for player $A$ if player $A$ writes the following numbers:
- $9$: Finish 1st. Player $B$ will be eliminated and $C$ will start the next round. Final order is $ACB$.
- $8$: Finish 2nd. Player $B$ will write $9$ eliminating $C$ and $A$ will start the final round. Final order is $BAC$.
- $7$: Finish 2nd. Player $B$ will write $8,9$. Final order is $BAC$.
- $6$: Finish 3rd. Player $B$ can do no better than 2nd, and $C$ will get the win. Final order is $CBA$.
- $5$: Finish 3rd. $B$ will write $6,7$ for same result as above. Final order $CBA$.
- $4$: Finish 1st. Player $B$ will be forced to write either $5$ or $6$, both of which result in a 3rd place finish. This leaves $C$ to go first in the final round. Final order is $ACB$.
- $3$: Finish 2nd. $B$ will get the win, so the final order is $BAC$.
- $2$: Finish 2nd. Player $B$ will write $3,4$ and finish 1st again. Final order is $BAC$.
- $1$: Finish 3rd. $B$ can do no better than 2nd, and $C$ will win. Final order is $CBA$.
Notice that to get the previous number, you simply need to figure out what $B$ will do. $B$ will have the choice of either the next number, or the next two, and will pick which ever gets the best result. Then you take the final ordering from that number and increment each player by one wrapping around to $A$ if necessary (e.g. $A$ become $B$, $B$ becomes $C$, and $C$ becomes $A$) to get the final ordering for the new number.
Thus, the person who goes second in the 3 person game can win. The person who goes first will choose to make $1,2$ as the first move and guarantee themselves second instead of third, allowing the person who goes second to write $3,4$ and put themselves in the winning position.
So if the initial setup is $ABC$ with $A$ to go first, then the final ordering will be $BAC$.
4 Player Game
Players are $A,B,C,$ and $D$.
The following are the results for player $A$ if player $A$ writes the following numbers:
- $9$: Finish 3rd. $B$ is eliminated, and the remaining players in order to start the final round are $CDA$. Final order will be $DCAB$.
- $8$: Finish 1st. $B$ would write $9$ and finish 3rd, final order is $ADBC$.
- $7$: Finish 2nd. $B$ would write $8$ and finish 1st. Final order is $BACD$.
- $6$: Finish 2nd. $B$ would write $7,8$ to finish 1st. Final order is $BACD$.
- $5$: Finish 4th. The best $B$ can do is finish 2nd. Final order is $CBDA$.
- $4$: Finish 4th. $B$ would write $5,6$ to claim 2nd, making the final order again $CBDA$.
- $3$: Finish 3rd. $B$ is forced to finish 4th. Final order will be $DCAB$.
- $2$: Finish 1st. 3rd is better than 4th, so $B$ will write just $3$. Final order is $ADBC$.
- $1$: Finish 2nd. $B$ would write $2$ and finish 1st. Final order is $BACD$.
So in the 4 person game, whoever goes first can win. If the initial order is $ABCD$ with $A$ to go first, then the final ordering is $ADBC$.
5 Player Game
Players are $A,B,C,D$ and $E$.
The following are the results for player $A$ if player $A$ writes the following numbers:
- $9$: Finish 2nd. $B$ is eliminated, and the remaining players in order to start the final round are $CDEA$. Final order will be $CADEB$.
- $8$: Finish 4th. $B$ would write $9$ and finish 2nd. Final: $DBEAC$.
- $7$: Finish 4th. $B$ would write $8,9$ and finish 2nd. Final: $DBEAC$.
- $6$: Finish 3rd. $B$ would be forced to finish 4th. Final: $ECABD$.
- $5$: Finish 1st. $B$ would write $6$ to finish 3rd instead of 4th. Final: $ADBCE$.
- $4$: Finish 5th. $B$ would write $5$ to finish first. Final: $BECDA$.
- $3$: Finish 5th. $B$ would write $5,6$ to finish first. Final: $BECDA$.
- $2$: Finish 2nd. $B$ finishes last no matter what is written. Final $CADEB$.
- $1$: Finish 4th. $B$ gets 2nd with $2$. Final: $DBEAC$.
So the only way to win the 5 person game is to be the one to write the $5$. This can be done by going third. The first player will choose to write $1,2$ since that is the better result. The second player finishes in last place no matter what they write, leaving the 3rd player to write the $5$ and win.
If the initial order is $ABCDE$ with $A$ to go first, then the final ordering is $CADEB$.
6 Player Game
Players are $A,B,C,D,E$ and $F$.
The following are the results for player $A$ if player $A$ writes the following numbers:
- $9$: Finish 4th. $B$ is eliminated, and the remaining players in order to start the final round are $CDEFA$. Final order will be $ECFADB$.
- $8$: Finish 3rd. $B$ would write $9$ and finish 4th. Final: $FDABEC$.
- $7$: Finish 1st. $B$ would write $8$ and finish 3rd. Final: $AEBCFD$.
- $6$: Finish 5th. $B$ would write $7$ for the win. Final: $BFCDAE$.
- $5$: Finish 5th. $B$ would write $6,7$ and win. Final: $BFCDAE$.
- $4$: Finish 2nd. $B$ gets 5th. Final: $CADEBF$.
- $3$: Finish 6th. $B$ would write $4$ to finish 2nd. Final: $DBEFCA$.
- $2$: Finish 6th. $B$ writes $3,4$ for 2nd. Final: $DBEFCA$.
- $1$: Finish 4th. $B$ gets 6th regardless. Final: $ECFADB$.
To win the 6 person game, you want to be the 5th player to go.
- Will write just $1$ since 4th place is better than 6th.
- Gets 6th no matter what they write.
- Will write $4$ to get 2nd instead of 5th.
- Gets 5th no matter what.
- Writes $7$ to win.
Final order assuming $A$ goes first in a 6 person game is $ECFADB$.
7 Player Game
Players are $A,B,C,D,E,F$ and $G$.
The following are the results for player $A$ if player $A$ writes the following numbers:
- $9$: Finish 3rd. $B$ is eliminated, and the remaining players in order to start the final round are $CDEFGA$. Final order will be $GEACFDB$.
- $8$: Finish 1st. $B$ would write $9$ and finish 3rd. Final: $AFBDGEC$.
- $7$: Finish 5th. $B$ would write $8$ and finish 1st. Final: $BGCEAFD$.
- $6$: Finish 5th. $B$ would write $7,8$ for the win. Final: $BGCEAFD$.
- $5$: Finish 2nd. $B$ gets 5th. Final: $CADFBGE$.
- $4$: Finish 6th. $B$ gets 2nd with $5$. Final: $DBEGCAF$.
- $3$: Finish 6th. $B$ gets 2nd again with $4,5$. Final: $DBEGCAF$.
- $2$: Finish 4th. $B$ gets 6th. Final: $ECFADBG$.
- $1$: Finish 7th. $B$ gets 4th with $2$. Final: $FDGBECA$.
To win the 7 person game, you want to be the 5th player to go.
- Will write just $1,2$ since 4th place is better than 7th.
- Gets 6th no matter what they write.
- Will write $5$ to get 2nd instead of 5th.
- Gets 5th no matter what.
- Writes $8$ to win.
Final order assuming $A$ goes first in a 7 person game is $ECFADBG$.
8 Player Game
Players are $A,B,C,D,E,F,G$ and $H$.
The following are the results for player $A$ if player $A$ writes the following numbers:
- $9$: Finish 7th. $B$ is eliminated, and the remaining players in order to start the final round are $CDEFGHA$. Final order will be $GEHCFDAB$.
- $8$: Finish 3rd. $B$ would write $9$ and finish 7th. Final: $HFADGEBC$.
- $7$: Finish 1st. $B$ would write $8$ and finish 3rd. Final: $AGBEHFCD$.
- $6$: Finish 5th. $B$ would write $7$ for the win. Final: $BHCFAGDE$.
- $5$: Finish 5th. $B$ writes $6,7$ for the win. Final: $BHCFAGDE$.
- $4$: Finish 2nd. $B$ gets 5th. Final: $CADGBHEF$.
- $3$: Finish 6th. $B$ writes $4$ for 2nd. Final: $DBEHCAFG$.
- $2$: Finish 6th. $B$ writes $3,4$ for 2nd. Final: $DBEHCAFG$.
- $1$: Finish 4th. $B$ gets 6th. Final: $ECFADBGH$.
To win the 8 person game, you want to be the 5th player to go.
- Will write just $1$ since 4th place is better than 6th.
- Gets 6th no matter what they write.
- Will write $4$ to get 2nd instead of 5th.
- Gets 5th no matter what.
- Writes $7$ to win.
Notice the strategy is identical to the 6 person game and very similar to the 7?
Final order assuming $A$ goes first in a 8 person game is $ECFA DBGH$.
9 Player Game
Players are $A,B,C,D,E,F,G,H$ and $I$.
The following are the results for player $A$ if player $A$ writes the following numbers:
- $9$: Finish 8th. $B$ is eliminated, and the remaining players in order to start the final round are $CDEF GHIA$. Final order will be $GEHC FDIAB$.
- $8$: Finish 7th. $B$ would write $9$ and finish 8th. Final: $HFID GEABC$.
- $7$: Finish 3rd. $B$ would write $8$ and finish 7th. Final: $IGAE HFBCD$.
- $6$: Finish 1st. $B$ would write $7$ for 3rd. Final: $AHBF IGCDE$.
- $5$: Finish 5th. $B$ writes $6$ for the win. Final: $BICG AHDEF$.
- $4$: Finish 5th. $B$ writes $5,6$ and wins. Final: $BICG AHDEF$.
- $3$: Finish 2nd. $B$ gets 5th. Final: $CADH BIEFG$.
- $2$: Finish 6th. $B$ writes $3$ for 2nd. Final: $DBEI CAFGH$.
- $1$: Finish 6th. $B$ writes $2,3$ for 2nd. Final: $DBEI CAFGH$.
To win the 9 person game, you want to be the 4th player to go.
- Gets 6th.
- Writes $3$ for 2nd place.
- Gets 5th no matter what.
- Writes $6$ to win.
Notice that player $I$ doesn't even get to play in the first round!
Final order assuming $A$ goes first in a 9 person game is $DBEIC AFGH$.
10 Player Game
Players are $A,B,C,D,E,F,G,H,I$ and $J$.
The following are the results for player $A$ if player $A$ writes the following numbers:
- $9$: Finish 4th. $B$ is eliminated, and the remaining players in order to start the final round are $CDEFG HIJA$. Final order will be $FDGAE CHIJB$.
- $8$: Finish 9th. $B$ would write $9$ and finish 4th. Final: $GEHBF DIJAC$.
- $7$: Finish 9th. $B$ would write $8,9$ and finish 4th. Final: $GEHBF DIJAC$.
- $6$: Finish 8th. $B$ gets 9th. Final: $HFICG EJABD$.
- $5$: Finish 7th. $B$ writes $6$ for 8th. Final: $IGJDH FABCE$.
- $4$: Finish 3rd. $B$ writes $5$ for 7th. Final: $JHAEI GBCDF$.
- $3$: Finish 1st. $B$ writes $4$ for 3rd. Final: $AIBFJ HCDEG$.
- $2$: Finish 5th. $B$ writes $3$ for 1st. Final: $BJCGA IDEFH$.
- $1$: Finish 5th. $B$ writes $2,3$ for the win. Final: $BJCGA IDEFH$.
To win the 10 person game, you want to be the 2nd player to go.
- Gets 5th no matter what they do.
- Writes $3$ for the win!
Neither $I$ nor $J$ get to actually play in the first round and $H$ is eliminated in the first round.
Final order assuming $A$ goes first in a 10 person game is $BJCGA IDEFH$.
Addendum
This can be extended indefinitely for groups of size $N$, but only by working out the solution for $N-1$ first. There does not seem to be a trivial formula suggested by this that can get you the solution for an arbitrary $N$ without knowing the intermediate results.
This solution, however, is very useful for every player of the game. It provides a quick lookup to see what your best move is at any stage of the game. For example, if I have survived until the round of 5 players and am presented with a $7$, I know that writing $8,9$ will get me a 2nd place finish if everyone else plays perfectly. If only one person doesn't play perfectly, then I may not do better than 2nd, but that player will definitely finish worse if the rest of the players play perfectly. This solution can continue to provide optimal responses even if things do not go according to plan.