Problems
Given a permutation
Let
Your task is to, given a permutation
Input
The first line of input contains an integer
Output
First, output a line containing the length
Then, output
Example #1
7
2 3 1 5 4 7 6
4
2 3 5 7
In this case, we have the permutation
Example #2
5
1 2 3 4 5
5
1 2 3 4 5
Example #3
5
5 4 3 2 1
1
5