Signal

No attempts yetTime limit1sMemory limit128 MB

Problem

In a project searching for extraterrestrial intelligence, a signal received from space was recorded as a sequence of integers. The original signal is a sequence ss of nn integers.

Someone cut this sequence into exactly kk consecutive fragments so that no fragment was too short or too long, i.e. every fragment has length between aa and bb inclusive.

Later a suspicious fragment ff of mm integers turned up. Decide whether ff could really be one of the fragments obtained by cutting the original sequence ss as above.

Formally, decide whether ss can be split into exactly kk consecutive fragments, each of length between aa and bb inclusive, such that one of those fragments equals ff (same length mm and the same values in the same order). If it is possible, also report the position in ss where that fragment starts (a 1-based index). If several starting positions are possible, report the smallest one.

Input

The first line contains the number of tests dd (1d10001 \le d \le 1000). The descriptions of the tests follow, one after another.

Each test is given as follows:

  • a line with nn (1n1051 \le n \le 10^5), the length of the original sequence ss;
  • a line with the nn integers s1,s2,,sns_1, s_2, \dots, s_n (109si109-10^9 \le s_i \le 10^9) that form the original sequence;
  • a line with three integers aa, bb, kk describing how the sequence is cut (1abn1 \le a \le b \le n; 1kn1 \le k \le n; aknbka \cdot k \le n \le b \cdot k);
  • a line with mm (amba \le m \le b), the length of the suspicious fragment;
  • a line with the mm integers f1,f2,,fmf_1, f_2, \dots, f_m (109fi109-10^9 \le f_i \le 10^9) that form the suspicious fragment ff.

Output

For each test print a single line. Print NIE if the suspicious fragment ff cannot come from the original sequence ss. Otherwise print TAK followed by a space and the 1-based position in the original sequence where the fragment starts. If several positions are possible, print the smallest one.

The output tokens TAK (yes) and NIE (no) are fixed strings and must be printed exactly as shown.