Petriukas wrote down all the numbers from 1 to n on the board in a random order, forming a sequence.
Between each pair of adjacent numbers, he inserted a sign (‘<’ or ‘>’) indicating which number is greater.
Given the sequence of comparison signs, help determine one possible sequence of numbers Petriukas might have written.
Input
The first line contains a single natural number n (2 \le n \le 100).
The second line contains a string of n-1 characters, consisting only of the symbols ‘<’ and ‘>’.
Output
Print a sequence of n numbers separated by spaces that satisfies the given pattern of comparisons.
If there are multiple valid answers, output any of them.
Examples
standard input | standard output |
---|
5
< < > <
| 2 3 5 1 4
|
3
< >
| 1 3 2
|