Grandpa Marat cherishes his granddaughter Masha, especially since she is the youngest in his family. He often engages her in various games.
For example, today they played a cognitive game called "Guess the Word." The rules are quite simple:
First, Grandpa thinks of a word. This word is any sequence of lowercase Latin letters, with the only condition that it must be a palindrome. Recall that a string of length is called a palindrome if S[i] = S[n - i + 1] for 1 \leq i \leq n.
On each turn, Masha may select any word and add it to either to the left or the right.
If the resulting string is not a palindrome, Grandpa tells Masha and the game ends.
If the resulting string is still a palindrome, the game continues.
When the game ends, Masha must name the word Grandpa originally thought of.
Grandpa recorded all of Masha's moves during the game. Now he wants to recall how the game ended. If Masha guessed the word, he wants to determine what it was. Otherwise, he wants to know whether she failed because there were several possible words, or because he made a mistake during the game.
The first line of the input contains two integers and (1 \leq n, m \leq 3000) — the length of the word Grandpa thought of, and the number of moves in the game.
The following lines each contain a word s_i consisting of lowercase Latin letters, representing the word Masha chose on the -th move. The total length of all s_i combined does not exceed .
The last line contains a string of characters, each being either or . w_i = L means the word s_i was added to the left of the current string on the -th move, w_i = R means it was added to the right.
Print Unique if Masha can uniquely determine the word Grandpa originally thought of, Ambiguous if there could be several such words, or Impossible if no such word exists and Grandpa made a mistake during the game.
Example 1