You have n strings s1, s2, ..., sn, where the strings are combination of lower case characters. You are going to perform q operations. Each operation is in the following format:
1. E i j: Check if si and sj are identical?
2. C i j: Update si to be the concatenation of si and sj.
The first line contains integer n and q.
The following n lines are the strings, with the i-th line containing si.
The following q lines are the queries described in the problem description.
For each operation E i j, please output 'Y' if $s_i$ and $s_j$ are identical, 'N' otherwise.