A kenning is a form of poetic metaphor, popular in ancient skaldic poetry, in which a single word is replaced by two or more words. For example, "giver of the gold" is a kenning for "warrior". The substitution is purely formal: there is no semantic difference between "poor giver of the gold" and "poor warrior". Kennings may be nested, so since "serpent's lair" refers to "gold", "giver of the serpent's lair" also refers to a warrior.
Suppose you urgently need a long text. Instead of panicking, prepare a short text plan together with a list of kennings, then expand the plan with the following procedure:
Because the replacements within a single pass happen simultaneously, a word introduced by one replacement is not expanded until the next pass.
The first line contains three integers: the line width $w$ ($1 \le w \le 255$), the minimal number of non-whitespace symbols required in the resulting text $l$ ($1 \le l \le 3000$), and the number of kennings $n$ ($1 \le n \le 380$).
Each of the next $n$ lines describes one kenning: the referent word followed by the kenning body. Every kenning body contains at least two words. Kennings may be recursive (for example, replacing "GNU" with "GNU is Not UNIX"). Referents are sensitive to case and grammatical form, so "warrior", "Warrior" and "warriors" are distinct and may have different kennings. No two kennings share the same referent.
The remaining lines form the text plan.
The whole input is at most 3000 bytes long and contains only English letters, underscores, spaces, line feeds, and digits (digits appear on the first line only). Every word is at most $w$ symbols long. Adjacent words are separated by exactly one space or one line feed, and no line has leading or trailing spaces.
If the procedure never stops (the text can never reach $l$ non-whitespace symbols), print a single line containing exactly No result.
Otherwise print the resulting text, using at most $w$ characters (including spaces) per line. Every line feed from the original plan must be preserved. Within each original line, a new line feed is inserted before a word whenever that word would not fit on the current line. Adjacent words on a line are separated by exactly one space, and no line has leading or trailing spaces. A correct answer is at most 10000 bytes long.