Little Joseph has recently bought a wheel of fortune. He wrote an uppercase letter of English alphabet onto each wedge.
No letter appears twice in the wheel, and the wheel spins in clockwise direction. There is a pointer that stays in the same place while the wheel is spinning. When we spin the wheel, the letter to which the pointer is pointing to changes accordingly.
Little Joseph rotated the wheel K times, and each time he wrote down by how many wedges the pointer moved changed, and what letter was pointed to at the end of that spin.
Little Hubert found that paper, and would like to now what letters Little Joseph wrote onto the wedges of the wheel.
Help him determine this, if the total number of wedges is known.
The first line of input contains integers N (2 ≤ N ≤ 25), the number of wedges on the wheel, and K (1 ≤ K ≤ 100), the number of spins.
The following K lines contain descriptions Little Joseph wrote down for each spin, in order.
Each line contains an integer S (1 ≤ S ≤ 100), the number of times the pointed letter changed during that spin, and an uppercase letter at which pointer stopped.
If there is no wheel that meets the requirements described, output !.
Otherwise, output sequence of letters written onto the wheel, starting from the pointed letter at the end of the last spin and proceeding clockwise. If some letter cant be determined, output ? instead.
Sample Input 1
Sample Output 1
Sample Input 2
Sample Output 2
Sample Input 3
Sample Output 3