Ancient Spider is a very popular card game, and Skylar loves playing it. Today she wants to play Ancient Spider again, but she changes the rule to make it more interesting. At the beginning of the game, Skylar has an empty slot on the table. There are \(n\) different cards numbered from \(1\) to \(n\), and Skylar will receive them one by one in a given order and put the cards onto the top of the slot. At any time, Skylar can pick up a card from the top of slot and discard it. If Skylar discards all \(n\) cards, the game is over. Skylar wants you to help her find the smallest lexicographical order among all possible discarding orders at the end of the game.

If you don't know the concept of lexicographical order, you can see the reference in the following link: https://en.wikipedia.org/wiki/Lexicographical_order