Given an array consisting of n elements, you need to find the index of the 1st occurrence of 1, the index of the 2nd occurrence of 2, and so on, up to the 9th occurrence of 9. Indexing starts from 1.
The first line contains a natural number, n(1≤n≤105).
The second line contains n numbers separated by spaces, ai(1≤ai≤109).
Output a single line with the indices. If the searched number does not exist, output −1.
10 5 1 2 6 3 2 4 3 6 3
2 6 10 -1 -1 -1 -1 -1 -1
15 5 2 3 4 5 4 5 3 2 3 4 5 4 5 1
15 9 10 13 14 -1 -1 -1 -1
Login to be able to submit.