Statement
Statement language
You are given a sequence of length .
Print any longest strictly increasing subsequence of . A subsequence is obtained by deleting zero or more elements while preserving the order of the remaining elements.
Input
The input is given in the following format:
Each case is given in the following format:
Output
For each case, print the length of a longest increasing subsequence on one line. On the next line, print the elements of such a subsequence separated by spaces.
If several longest increasing subsequences exist, you may print any of them.
Constraints
- .
- .
- ().
- The sum of over all cases is at most .
Subtasks
Samples
Input
4
5
3 1 2 1 4
4
4 3 2 1
5
2 2 2 2 2
1
-1000000000
Output
3
1 2 4
1
1
1
2
1
-1000000000