A terrible word search: find the word NEEDLE in this grid.

word search
Find the word NEEDLE in this grid.
word search
Find the word NEEDLE in this grid.

Input

The first line contains a word $$w$$ that only consists of letters.

The second line contains a number $$n \in \mathbb{N}_0$$. This is followed by another $$n$$ lines, each containing a fixed number of letters (at least as much as there are letters in the word $$w$$). These $$n$$ lines make up the grid of a word search in which the word $$w$$ can be read at most once from left to right or from right to left. When reading the word, no distinction is made between uppercase and lowercase letters.

Output

If the word $$w$$ does not appear in the grid, this must be reported as follows:

WORD is not found

Otherwise, the position of the word $$w$$ must be reported as follows:

WORD is on row r and column c

I each case, the word $$w$$ must be filled up at the placeholder WORD.

The placeholders r and c must respectively be filled up with the row number $$r$$ and the column number $$c$$ of the position where the leftmost letter of the word $$w$$ is found in the grid. If the word $$w$$ can be read from left to right, then this is the position of the first letter in the word. Otherwise, this is the position of the last letter in the word. The rows of the grid are numbered from top to bottom and the columns from left to right, each time starting at zero.

Example

Input:

Needle
4
NnEElNnNED
NEDeeDEdDn
leeLdEEnNN
DEdnENdNLe

Output:

Needle is on row 2 and column 2

Example

Input:

NEEDLE
30
DLDDLDDNELNENLDLELLDEEEDEELDDEDELLNN
ELELDNNNLELLDDNLNDDDELDDDDLDNELEDELL
NELNLLDLDNELNLDDDLLNNLEDNEEEDDDDNDNN
LELEDDLLEDDLNNELDLELEDLEDLNENDENDNND
ELLNLELNLDEDLENNEENLENDELDDLLENDLDNL
LDNDDDNDEEEDLDNELNLNNEDELNLNLNLEDELL
ENELNEENLLEEEEDDELNEENNENEDNDNDLDEDN
DLDDDDLDNLDDNLLELLLDLDNEDDNLLLNELLDL
DLLDNELELEEDNDNDNEDEENDDELELLNLLLLEE
LDLENDNEDDDLEDDLENNLDDDENDENLNNDLELL
DEDDEEDNNDLNEENNDENDDDDDENEDDDLDENLN
NNDLNEENDDLEDDNNDLLDLLENENLNDLNLELEE
NDNDEDNDNLDNDEDNNLDDDDDDLELNDNNDNLEE
DDNDDDDLLNNLDNEDNELNNNNNDEDNELDENLED
LENNEENDNNLLEDNNNEEDLDNNNLLLNLEEEEED
NEENDDDDLNEDNEDDDDLNNEELDLEEEDDNDLLN
EEELEDDEELNELLNNENNNNNDDNEELEEELELEL
ENDDLLNDDEENDDLNENNLDELNNDDENDEDDLEL
DDLNNLLNDDELNLLELLNENNNLNLEDEDDLEENE
NELDNDELLLNNLENDNLENNEEDDDDELEDLLLEN
NNEEDLELNENLELDDNDELNLNDNDNNLENLLLED
NDDLNDNLLDELNEDDDDLENNDDLDNDDDNLNENN
LNELLNDDLDENDDNENNDNLEENELELLNDELLDL
LENNLDLDEDLNEDEELDLLNNLDELLLNNENELEN
NDLDDEDNDDLNEEDNEDLDLLDDNLELDLEELNEL
NNNLNNDDEDDLLNDDLDLDEENEDENEEEELELDE
NEEEENDDENNELEDLNLDDENEDLDLLDDENEEED
NELNDNELELNNELLNNLEEDDLDELELLEENLLEN
ENNNENLNNNELENLEDELLLDNNDENENNEEDELN
EEEDNDLNNLDLEEDNLLNEDNNDNDDEENLELNND

Output:

NEEDLE is on row 20 and column 1

Epilogue

In 2014, Italian artist Sven Sachsalber set out literally to find a needle in a haystack1.

The performance — undertaken at the Palais de Tokyo in Paris — was allotted two days. Amazingly, Sachsalber found the needle with a few hours to spare.

Now we need a new saying.