Non-Interactive Guessing Number

Given N, K, and Theodora's answer string, output guess values that follow the rules, or -1 if impossible.

Hard8Binary searchGreedyMathImplementationNo attempts yetTime limit2sMemory limit512 MB

Problem

Romanos: “Can I submit an interactive problem to the contest?”

Theodora: “No.”

Romanos: “Aww, that is not fun.”

So Romanos submitted this non-interactive version instead. Theodora first chooses an integer between 11 and NN inclusive. Romanos may make up to KK guesses. For each guess, Theodora answers << if her number is smaller than the guess, >> if her number is larger than the guess, and == if the guess is correct. The game ends immediately when Romanos guesses correctly, or after KK wrong guesses.

Romanos does not always play optimally, but he never makes a silly guess. Every guess lies between 11 and NN inclusive and is consistent with all previous answers. For example, if N=10N = 10 and his first guess is 44 and the answer is <<, his next guess is always between 11 and 33 inclusive.

Theodora plays to make Romanos lose and changes her hidden number adaptively whenever it stays consistent with her previous answers. Whenever she can answer << or >>, she chooses the answer that leaves the larger set of possible numbers. If both sides leave the same number of possibilities, she answers <<. For example, if N=10N = 10 and the first guess is 44, she answers >> because 55 to 1010 inclusive is larger than 11 to 33 inclusive.

You are given NN, KK, and the sequence of Theodora's answers. Output any guess sequence by Romanos that is consistent with the rules of both players, or 1-1 if no such sequence exists.

Input

The first line contains two integers NN and KK (1N10181 ≤ N ≤ 10^{18}, 1K500001 ≤ K ≤ 50000), the range of numbers and the maximum number of guesses.

The second line contains a string SS of Theodora's answers. Each character is one of <<, >>, ==, and either:

  • the last character is ==, every other character is << or >>, and the length of SS is at most KK, or
  • every character is << or >>, and the length of SS is exactly KK.

Output

Let MM be the length of SS.

  • If a guess sequence consistent with the rules exists, output MM integers A1,A2,...,AMA_1, A_2, ..., A_M in one line, where AiA_i is the ii-th guess. If several sequences exist, output any of them.
  • Otherwise output 1-1 in one line.