Given integers . Delete from them the least number of integers so that the rest were in ascending order.
The first line contains the number . The second line contains the integers .
Print in the first line the number of not erased integers. In the second line print the list of unerased integers in the original order. If several answers exist, print any.