SP2709 UNTITLED - Untitled Problem

Description

We consider a sequence **S $ _{1} $** is **equal** to a sequence **S $ _{2} $** , if and only if they satisfy the following conditions: - The length of them are equal. - Let **Len** be the length of them. For each i,j(1

Input Format

Multiple test cases, the number of them(no more than 3) is given in the very first line. For each test case: - The first line contains an integer **M** (**M** > 1) which denote the number of sequences. **i.e.** **M** = **N** + 1. - **M** \* 2 lines follow, each two lines describe one sequence.For each two lines, the first line contains an integer **L** which denote the length of this sequence. The second line contains **L** integers(all the integers don't exceed 2 $ ^{31} $ -1) that represent this sequence. The first sequence described is **S**, the next **N** sequences represent **T $ _{1} $** ... **T $ _{N} $** . - You can assume that there are no same integer in any one sequence. - The length of **S** is no more than 400000, and the total length of **T** is no more than 100000.

Output Format

For each test case: Print the positions which is **OK** in increasing order.