Sonya always brings her guitar on hikes. One evening, she and her friends gathered around the campfire to sing songs. Everyone was very tired, so they decided that each person would play at most one song this evening, so they could go to bed earlier.
After a person finishes playing a song, they pass the guitar to a person they had previously chosen, and go to sleep. If the chosen person is no longer at the campfire, the entire group goes to sleep.
Moreover, once both neighbors of a person have played, that person loses interest and also goes to sleep.
Determine the order in which people will play the guitar.
The first line contains an integer (3 \leq n \leq 100000), the number of people around the campfire. The second line contains numbers, indicating preferences: the -th number is the number of the person to whom the -th person wants to pass the guitar. People are listed in counterclockwise order.
Initially, Sonya, who is number , has the guitar. It is guaranteed that no one plans to pass the guitar to themselves.
On the first line, output one integer—the number of songs that will be played. On the next line, output the numbers of the people who will play the guitar in the order they will play.
Example 1