

      N (1<=N<=100),    N 
,     1000.

 N    .

  
5
3 1 2 4 2

  
1 2 2 3 4