Given a string of length consisting of <
and >
, generate a permutation of the integers such that if <
, , otherwise, . If there are multiple solutions, print the lexicographically least.
Input Specification
The first line of input will contain the integer , the length of the string. The next line will contain the string of length .
Output Specification
On one line, output the lexicographically least permutation that satisfies the requirements.
Subtasks
Subtask 1 [30%]
Subtask 2 [70%]
No further constraints.
Sample Input
4
<<><
Sample Output
1 2 4 3 5
Comments