Question:
Polycarp has come up with a new game to play with you. He calls it "A missing bigram".

A bigram of a word is a sequence of two adjacent letters in it.

For example, word "abbaaba" contains bigrams "ab", "bb", "ba", "aa", "ab" and "ba".

The game goes as follows. First, Polycarp comes up with a word, consisting only of lowercase letters 'a' and 'b'. Then, he writes down all its bigrams on a whiteboard in the same order as they appear in the word. After that, he wipes one of them off the whiteboard.

Finally, Polycarp invites you to guess what the word that he has come up with was.

Your goal is to find any word such that it's possible to write down all its bigrams and remove one of them, so that the resulting sequence of bigrams is the same as the one Polycarp ended up with.

The tests are generated in such a way that the answer exists. If there are multiple answers, you can print any of them.

Input

The first line contains a single integer t (1 ≤ t ≤ 2000) — the number of testcases.

The first line of each testcase contains a single integer n (3 ≤ n ≤ 100) — the length of the word Polycarp has come up with.

The second line of each testcase contains n-2 bigrams of that word, separated by a single space. Each bigram consists of two letters, each of them is either 'a' or 'b'.

Additional constraint on the input: there exists at least one string such that it is possible to write down all its bigrams, except one, so that the resulting sequence is the same as the sequence in the input. In other words, the answer exists.

Output

For each testcase print a word, consisting of n letters, each of them should be either 'a' or 'b'. It should be possible to write down all its bigrams and remove one of them, so that the resulting sequence of bigrams is the same as the one Polycarp ended up with.

The tests are generated in such a way that the answer exists. If there are multiple answers, you can print any of them.

Example

Input

4
7
ab bb ba aa ba
7
ab ba aa ab ba
3
aa
5
bb ab bb

Output

abbaaba
abaabaa
baa
bbabb

Note

The first two testcases from the example are produced from the word "abbaaba". As listed in the statement, it contains bigrams "ab", "bb", "ba", "aa", "ab" and "ba".

In the first testcase, the 5-th bigram is removed.

In the second testcase, the 2-nd bigram is removed. However, that sequence could also have been produced from the word "abaabaa". It contains bigrams "ab", "ba", "aa", "ab", "ba" and "aa". The missing bigram is the 6-th one.

In the third testcase, all of "baa", "aab" and "aaa" are valid answers.

{"inputs": ["4\n7\nab bb ba aa ba\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab ab\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa bb ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa b`\n7\nab ba aa ab ab\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab ab\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa aa\n7\nab ba aa ab ab\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\nba ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa b_\n7\nab ba aa ab ab\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa aa\n7\nab aa aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa ba\n7\nab ba ba ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nbb bb ba aa ba\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb bb aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\naa ba aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa b`\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa b`\n7\nab ba aa aa ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba ab ba\n7\nab ba aa bb ba\n3\naa\n5\nbb ab bb\n", "4\n7\nbb bb ba aa ba\n7\nba ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb bb aa aa\n7\nab ba aa aa ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\naa aa aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa ba\n7\nba ba aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ba bd\n", "4\n7\nab bb ba aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nbb bb bb aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\naa aa aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa aa\n7\nab aa aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa ba\n7\nbb ba aa bb ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa bb ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba ab ba\n7\nab ba aa bb ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nba bb ba aa aa\n7\naa aa aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb bb aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa aa\n7\naa aa aa bb ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nbb bb ba aa bb\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nbb bb bb aa aa\n7\nab ba ba ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba ab aa\n7\nab aa aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa ba\n7\nab bb aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa ba\n7\nab ba ab bb ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba ab aa\n7\naa aa aa bb ba\n3\naa\n5\nbb ba ba\n", "4\n7\nbb bb bb aa aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa b`\n7\nab ba aa ab ab\n3\naa\n5\nab ba bb\n", "4\n7\nab bb bb aa aa\n7\nab ba ab ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\nab ba ab ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab ab ba aa aa\n7\naa aa aa bb ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa b^\n7\nab ba aa ab ab\n3\naa\n5\nbb ab bb\n", "4\n7\nba bb ba aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba ab ba\n7\nab ba aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba ba aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb bb aa ab\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa ba\n7\naa aa aa bb ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa ba\n7\nab bb ba ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa ba\n7\nab ba bb bb ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba ab ba\n7\nab bb aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa ba\n7\nab ba aa aa aa\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb bb ab ba\n7\nab bb aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa aa\n7\naa aa ab ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa aa\n7\nab aa aa ab ba\n3\naa\n5\nab ba ba\n", "4\n7\nab bb ba aa ba\n7\nab ba ab ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb bb aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bd\n", "4\n7\nbb bb ba aa bb\n7\nab ba aa ab ab\n3\naa\n5\nbb ba bb\n", "4\n7\nbb bb bb aa aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb bb aa aa\n7\nab ba ab ab bb\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa b^\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab ba ba aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nba bb ba ab ba\n7\nab bb aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab ba ba aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\nba ba aa ab bb\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb bb aa aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa bb\n7\nab ba ba ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa b`\n7\nba ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\nab aa aa ab ba\n3\naa\n5\nbb ba b`\n", "4\n7\nba bb ba aa aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa b`\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba ab ab\n7\nab ba aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb bb ab ba\n7\nab bb aa ab b`\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa aa\n7\naa ba aa ab b`\n3\naa\n5\nbb ab bc\n", "4\n7\nab ba ba aa aa\n7\nab ba aa ab ab\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba ab ab\n7\nba ba aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab ba ba aa aa\n7\naa ab aa ab b`\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\nab aa aa ab ba\n3\naa\n5\nab ba bb\n", "4\n7\nab bb ba aa ba\n7\naa ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb bb aa aa\n7\nab ba aa ab ab\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba ab ab\n7\nab ba aa bb ba\n3\naa\n5\nbb ba bb\n", "4\n7\nbb bb ba aa ba\n7\naa aa aa bb ba\n3\naa\n5\nbb ba ba\n", "4\n7\naa bb ba aa aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nba bb ba aa aa\n7\nab ba ab ba ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa ba\n7\nab ba ab ba aa\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa ba\n7\nab bb ba ab ab\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa aa\n7\nba ab aa ab b`\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba ab aa\n7\nba ab aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nbb bb bb aa aa\n7\nab ba aa ab ab\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba ab ba\n7\nab aa aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nbb bb ba aa ba\n7\naa aa ab bb ba\n3\naa\n5\nbb ba ba\n", "4\n7\nbb bb ba aa ba\n7\nab bb ba ab ab\n3\naa\n5\nbb ba ba\n", "4\n7\nbb bb ba aa ba\n7\nab aa ab bb ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa aa\n7\naa ab aa ab ba\n3\naa\n5\nbb ba bd\n", "4\n7\nbb bb ba aa ba\n7\nbb bb ba ab ab\n3\naa\n5\nbb ba ba\n", "4\n7\nbb bb ba aa ba\n7\naa ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb bb aa aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nbb bb ba aa ba\n7\nba ba aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab ab\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa bb ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa b`\n7\nab ba aa ab ab\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\nab ba ba ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa b`\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa b`\n7\nab ba aa ba ab\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab aa\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa ba\n7\nab ba ab ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa b`\n7\nab ba aa aa ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa b_\n7\nab ba aa ba ab\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa aa\n7\nba ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nbb bb bb aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb bb aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab aa\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\nbb ba aa bb ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab aa\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa aa\n7\naa ab aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab aa\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa aa\n7\nab ba aa ba ab\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa b`\n7\nab aa aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba ab ba\n7\nab ba aa bb ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa b`\n7\nab ba aa ab aa\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\nab ba ab ba ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ba aa\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa ba\n7\nab bb ba ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa aa\n7\nab ba ab ba ba\n3\naa\n5\nbb ab bc\n", "4\n7\nbb bb ba aa ba\n7\nba ba aa ab ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa aa\n7\naa ab aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nba bb ba aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa ba\n7\nab bb ba ab aa\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb bb aa aa\n7\nab ba aa aa ba\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ab aa\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa b_\n7\nab ba aa ba ab\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa ba\n7\nab bb ba ab aa\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb bb ab ba\n7\nab bb aa ab b`\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa aa\n7\naa ab aa ab b`\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa ba\n7\nab ba aa ba ab\n3\naa\n5\nbb ab bb\n", "4\n7\nab bb ba aa aa\n7\nba ab aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa aa\n7\nab ba aa ab ba\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb ba aa aa\n7\nab aa aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba ab ba\n7\nab aa aa ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba aa ba\n7\nab ab ba ab ba\n3\naa\n5\nbb ba ba\n", "4\n7\nab bb ba ab ba\n7\nab bb aa ab ba\n3\naa\n5\nbb ab ba\n", "4\n7\nab bb ba aa aa\n7\naa ab aa ab ba\n3\naa\n5\nbb ab bc\n", "4\n7\nab bb bb ba aa\n7\naa ba aa ab ba\n3\naa\n5\nbb ba bb\n", "4\n7\nab bb ba aa aa\n7\naa ab aa ab ba\n3\naa\n5\nbb ba bc\n", "4\n7\nab bb ba aa ba\n7\nba ba aa ab ba\n3\naa\n5\nbb ab bb\n"], "outputs": ["abbaaba\nabaabaa\naaa\nbbabb\n", "abbaaba\nabaabaa\naaa\nbbabb\n", "abbaaba\nabaabab\naaa\nbbabb\n", "abbaaba\nabaabaa\naaa\nbbabb\n", "abbaaba\nabaabba\naaa\nbbabb\n", "abbaab`\nabaabab\naaa\nbbabb\n", "abbaaba\nabaabab\naaa\nbbaba\n", "abbaaaa\nabaabab\naaa\nbbaba\n", "abbaaaa\nabaabaa\naaa\nbbabb\n", "abbaaba\nbabaaba\naaa\nbbabb\n", "abbaab_\nabaabab\naaa\nbbabb\n", "abbaaaa\nabaaaba\naaa\nbbabb\n", "abbaaba\nabaabaa\naaa\nbbaba\n", "abbaaba\nabababa\naaa\nbbabb\n", "abbaaaa\nbabaaba\naaa\nbbabb\n", "bbbaaba\nabaabaa\naaa\nbbabb\n", "abbbaaa\nabaabaa\naaa\nbbabb\n", "abbaaba\naabaaba\naaa\nbbaba\n", "abbaab`\nabaabaa\naaa\nbbabb\n", "abbaab`\nabaaaba\naaa\nbbabb\n", "abbabaa\nabaabba\naaa\nbbabb\n", "bbbaaba\nbabaaba\naaa\nbbabb\n", "abbbaaa\nabaaaba\naaa\nbbabb\n", "abbaaaa\naaaabaa\naaa\nbbabb\n", "abbaaaa\nbabaaba\naaa\nbbabc\n", "abbaaba\nbabaaba\naaa\nbbaba\n", "abbaaaa\nbabaaba\naaa\nbbabd\n", "abbaaaa\nabaabaa\naaa\nbbabc\n", "bbbbaaa\nabaabaa\naaa\nbbabb\n", "abbaaaa\naaaabaa\naaa\nbbaba\n", "abbaaaa\nabaaaba\naaa\nbbaba\n", "abbaaba\nbbaabba\naaa\nbbabb\n", "abbaaba\nabaabba\naaa\nbbaba\n", "abbabaa\nabaabba\naaa\nbbaba\n", "abbaaaa\naabaaba\naaa\nbbabc\n", "babbaaa\naaaabaa\naaa\nbbaba\n", "abbbaaa\nabaabaa\naaa\nbbabc\n", "abbaaaa\naaaabba\naaa\nbbaba\n", "abbaaaa\naabaaba\naaa\nbbaba\n", "bbbaabb\nabaabaa\naaa\nbbabb\n", "bbbbaaa\nabababa\naaa\nbbabb\n", "abbabaa\nabaaaba\naaa\nbbaba\n", "abbaaba\nabbaaba\naaa\nbbaba\n", "abbaaba\nababbaa\naaa\nbbabb\n", "abbabaa\naaaabba\naaa\nbbaba\n", "bbbbaaa\nbabaaba\naaa\nbbabb\n", "abbaaba\nabaabaa\naaa\nbbabc\n", "abbaab`\nabaabab\naaa\nababb\n", "abbbaaa\nabababa\naaa\nbbabb\n", "abbaaaa\nabababa\naaa\nbbabc\n", "ababaaa\naaaabba\naaa\nbbaba\n", "abbaab^\nabaabab\naaa\nbbabb\n", "babbaaa\nabaabaa\naaa\nbbabc\n", "abbaaaa\nabaabaa\naaa\nbbaba\n", "abbabaa\nabaabaa\naaa\nbbaba\n", "abbabaa\nbabaaba\naaa\nbbabb\n", "abbbaab\nabaabaa\naaa\nbbabc\n", "abbaaba\naaaabba\naaa\nbbaba\n", "abbaaba\nabbabaa\naaa\nbbaba\n", "abbaaba\nababbba\naaa\nbbabb\n", "abbabaa\nabbaaba\naaa\nbbaba\n", "abbaaaa\nbabaaba\naaa\nbbaba\n", "abbaaba\nabaaaaa\naaa\nbbabc\n", "abbbaba\nabbaaba\naaa\nbbaba\n", "abbaaaa\naaababa\naaa\nbbaba\n", "abbaaaa\nabaaaba\naaa\nababa\n", "abbaaba\nabababa\naaa\nbbaba\n", "abbbaaa\nabaabaa\naaa\nbbabd\n", "bbbaabb\nabaabab\naaa\nbbabb\n", "bbbbaaa\nbabaaba\naaa\nbbabc\n", "abbbaaa\nabababb\naaa\nbbabb\n", "abbaab^\nabaabaa\naaa\nbbabb\n", "ababaaa\nabaabaa\naaa\nbbaba\n", "babbaba\nabbaaba\naaa\nbbaba\n", "ababaaa\nabaabaa\naaa\nbbabb\n", "abbaaaa\nbabaabb\naaa\nbbabb\n", "abbbaaa\naabaaba\naaa\nbbabb\n", "abbaabb\nabababa\naaa\nbbabb\n", "abbaab`\nbabaaba\naaa\nbbabb\n", "abbaaaa\nabaaaba\naaa\nbbab`\n", "babbaaa\naabaaba\naaa\nbbabc\n", "abbaab`\nabaabaa\naaa\nbbabc\n", "abbabab\nabaabaa\naaa\nbbaba\n", "abbbaba\nabbaab`\naaa\nbbaba\n", "abbaaaa\naabaab`\naaa\nbbabc\n", "ababaaa\nabaabab\naaa\nbbaba\n", "abbabab\nbabaaba\naaa\nbbaba\n", "ababaaa\naabaab`\naaa\nbbabc\n", "abbaaaa\naabaaba\naaa\nbbabb\n", "abbaaaa\nabaaaba\naaa\nababb\n", "abbaaba\naabaaba\naaa\nbbabb\n", "abbbaaa\nabaabab\naaa\nbbabc\n", "abbabab\nabaabba\naaa\nbbabb\n", "bbbaaba\naaaabba\naaa\nbbaba\n", "aabbaaa\naabaaba\naaa\nbbaba\n", "babbaaa\nabababa\naaa\nbbabc\n", "abbaaba\nababaaa\naaa\nbbabc\n", "abbaaba\nabbabab\naaa\nbbaba\n", "abbaaaa\nbabaab`\naaa\nbbabc\n", "abbabaa\nbabaaba\naaa\nbbabc\n", "bbbbaaa\nabaabab\naaa\nbbabc\n", "abbabaa\nabaaaba\naaa\nbbabb\n", "bbbaaba\naaabbaa\naaa\nbbaba\n", "bbbaaba\nabbabab\naaa\nbbaba\n", "bbbaaba\nabaabba\naaa\nbbaba\n", "abbaaaa\naabaaba\naaa\nbbabd\n", "bbbaaba\nbbbabab\naaa\nbbaba\n", "bbbaaba\naabaaba\naaa\nbbabb\n", "abbbaaa\nbabaaba\naaa\nbbabb\n", "bbbaaba\nbabaaba\naaa\nbbaba\n", "abbaaba\nabaabab\naaa\nbbabb\n", "abbaaba\nabaabba\naaa\nbbabb\n", "abbaab`\nabaabab\naaa\nbbabb\n", "abbaaba\nabababa\naaa\nbbabb\n", "abbaab`\nabaabaa\naaa\nbbabb\n", "abbaab`\nabaabab\naaa\nbbabb\n", "abbaaba\nabaabaa\naaa\nbbaba\n", "abbaaba\nabaabaa\naaa\nbbaba\n", "abbaaba\nabababa\naaa\nbbabb\n", "abbaab`\nabaaaba\naaa\nbbabb\n", "abbaab_\nabaabab\naaa\nbbabb\n", "abbaaaa\nbabaaba\naaa\nbbabb\n", "bbbbaaa\nabaabaa\naaa\nbbabb\n", "abbbaaa\nabaabaa\naaa\nbbabc\n", "abbaaba\nabaabaa\naaa\nbbabb\n", "abbaaba\nbbaabba\naaa\nbbabb\n", "abbaaba\nabaabaa\naaa\nbbabb\n", "abbaaaa\naabaaba\naaa\nbbaba\n", "abbaaba\nabaabaa\naaa\nbbabc\n", "abbaaaa\nabaabab\naaa\nbbaba\n", "abbaab`\nabaaaba\naaa\nbbabb\n", "abbabaa\nabaabba\naaa\nbbabb\n", "abbaaaa\naabaaba\naaa\nbbaba\n", "abbaab`\nabaabaa\naaa\nbbabb\n", "abbaaaa\nabababa\naaa\nbbabc\n", "abbaaba\nabaabaa\naaa\nbbabc\n", "abbaaba\nabbabaa\naaa\nbbaba\n", "abbaaaa\nabababa\naaa\nbbabc\n", "bbbaaba\nbabaaba\naaa\nbbabb\n", "abbaaaa\naabaaba\naaa\nbbabc\n", "abbaaaa\naabaaba\naaa\nbbaba\n", "babbaaa\nabaabaa\naaa\nbbabc\n", "abbaaba\nabbabaa\naaa\nbbaba\n", "abbbaaa\nabaaaba\naaa\nbbabb\n", "abbaaba\nabaabaa\naaa\nbbaba\n", "abbaab_\nabaabab\naaa\nbbabb\n", "abbaaba\nabbabaa\naaa\nbbaba\n", "abbbaba\nabbaab`\naaa\nbbaba\n", "abbaaaa\naabaab`\naaa\nbbabc\n", "abbaaba\nabaabab\naaa\nbbabb\n", "abbaaaa\nbabaaba\naaa\nbbabc\n", "abbaaaa\nabaabaa\naaa\nbbabc\n", "abbaaaa\nabaaaba\naaa\nbbaba\n", "abbabaa\nabaaaba\naaa\nbbaba\n", "abbaaba\nabababa\naaa\nbbaba\n", "abbabaa\nabbaaba\naaa\nbbaba\n", "abbaaaa\naabaaba\naaa\nbbabc\n", "abbbaaa\naabaaba\naaa\nbbabb\n", "abbaaaa\naabaaba\naaa\nbbabc\n", "abbaaba\nbabaaba\naaa\nbbabb\n"]}


Question:
You are given an array a consisting of n positive integers. You have to choose a positive integer d and paint all elements into two colors. All elements which are divisible by d will be painted red, and all other elements will be painted blue.

The coloring is called beautiful if there are no pairs of adjacent elements with the same color in the array. Your task is to find any value of d which yields a beautiful coloring, or report that it is impossible.

Input

The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of testcases.

The first line of each testcase contains one integer n (2 ≤ n ≤ 100) — the number of elements of the array.

The second line of each testcase contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^{18}).

Output

For each testcase print a single integer. If there is no such value of d that yields a beautiful coloring, print 0. Otherwise, print any suitable value of d (1 ≤ d ≤ 10^{18}).

Example

Input

5
5
1 2 3 4 5
3
10 5 15
3
100 10 200
10
9 8 2 6 6 2 8 6 5 4
2
1 3

Output

2
0
100
0
3


Question:
You are given an array a of n integers, and another integer k such that 2k ≤ n.

You have to perform exactly k operations with this array. In one operation, you have to choose two elements of the array (let them be a_i and a_j; they can be equal or different, but their positions in the array must not be the same), remove them from the array, and add ⌊ (a_i)/(a_j) ⌋ to your score, where ⌊ x/y ⌋ is the maximum integer not exceeding x/y.

Initially, your score is 0. After you perform exactly k operations, you add all the remaining elements of the array to the score.

Calculate the minimum possible score you can get.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 500) — the number of test cases.

Each test case consists of two lines. The first line contains two integers n and k (1 ≤ n ≤ 100; 0 ≤ k ≤ ⌊ n/2 ⌋).

The second line contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 2 ⋅ 10^5).

Output

Print one integer — the minimum possible score you can get.

Example

Input

5
7 3
1 1 1 2 1 3 1
5 1
5 5 5 5 5
4 2
1 3 3 7
2 0
4 2
9 2
1 10 10 1 10 2 7 10 3

Output

2
16
0
6
16

Note

Let's consider the example test.

In the first test case, one way to obtain a score of 2 is the following one:

  1. choose a_7 = 1 and a_4 = 2 for the operation; the score becomes 0 + ⌊ 1/2 ⌋ = 0, the array becomes [1, 1, 1, 1, 3];
  2. choose a_1 = 1 and a_5 = 3 for the operation; the score becomes 0 + ⌊ 1/3 ⌋ = 0, the array becomes [1, 1, 1];
  3. choose a_1 = 1 and a_2 = 1 for the operation; the score becomes 0 + ⌊ 1/1 ⌋ = 1, the array becomes [1];
  4. add the remaining element 1 to the score, so the resulting score is 2.

In the second test case, no matter which operations you choose, the resulting score is 16.

In the third test case, one way to obtain a score of 0 is the following one:

  1. choose a_1 = 1 and a_2 = 3 for the operation; the score becomes 0 + ⌊ 1/3 ⌋ = 0, the array becomes [3, 7];
  2. choose a_1 = 3 and a_2 = 7 for the operation; the score becomes 0 + ⌊ 3/7 ⌋ = 0, the array becomes empty;
  3. the array is empty, so the score doesn't change anymore.

In the fourth test case, no operations can be performed, so the score is the sum of the elements of the array: 4 + 2 = 6.


Question:
n towns are arranged in a circle sequentially. The towns are numbered from 1 to n in clockwise order. In the i-th town, there lives a singer with a repertoire of a_i minutes for each i ∈ [1, n].

Each singer visited all n towns in clockwise order, starting with the town he lives in, and gave exactly one concert in each town. In addition, in each town, the i-th singer got inspired and came up with a song that lasts a_i minutes. The song was added to his repertoire so that he could perform it in the rest of the cities.

Hence, for the i-th singer, the concert in the i-th town will last a_i minutes, in the (i + 1)-th town the concert will last 2 ⋅ a_i minutes, ..., in the ((i + k) mod n + 1)-th town the duration of the concert will be (k + 2) ⋅ a_i, ..., in the town ((i + n - 2) mod n + 1) — n ⋅ a_i minutes.

You are given an array of b integer numbers, where b_i is the total duration of concerts in the i-th town. Reconstruct any correct sequence of positive integers a or say that it is impossible.

Input

The first line contains one integer t (1 ≤ t ≤ 10^3) — the number of test cases. Then the test cases follow.

Each test case consists of two lines. The first line contains a single integer n (1 ≤ n ≤ 4 ⋅ 10^4) — the number of cities. The second line contains n integers b_1, b_2, ..., b_n (1 ≤ b_i ≤ 10^{9}) — the total duration of concerts in i-th city.

The sum of n over all test cases does not exceed 2 ⋅ 10^5.

Output

For each test case, print the answer as follows:

If there is no suitable sequence a, print NO. Otherwise, on the first line print YES, on the next line print the sequence a_1, a_2, ..., a_n of n integers, where a_i (1 ≤ a_i ≤ 10^{9}) is the initial duration of repertoire of the i-th singer. If there are multiple answers, print any of them.

Example

Input

4
3
12 16 14
1
1
3
1 2 3
6
81 75 75 93 93 87

Output

YES
3 1 3
YES
1
NO
YES
5 5 4 1 4 5

Note

Let's consider the 1-st test case of the example:

  1. the 1-st singer in the 1-st city will give a concert for 3 minutes, in the 2-nd — for 6 minutes, in the 3-rd — for 9 minutes;
  2. the 2-nd singer in the 1-st city will give a concert for 3 minutes, in the 2-nd — for 1 minute, in the 3-rd - for 2 minutes;
  3. the 3-rd singer in the 1-st city will give a concert for 6 minutes, in the 2-nd — for 9 minutes, in the 3-rd — for 3 minutes.


Question:
You are given two positive integers x and y. You can perform the following operation with x: write it in its binary form without leading zeros, add 0 or 1 to the right of it, reverse the binary form and turn it into a decimal number which is assigned as the new value of x.

For example:

  * 34 can be turned into 81 via one operation: the binary form of 34 is 100010, if you add 1, reverse it and remove leading zeros, you will get 1010001, which is the binary form of 81.
  * 34 can be turned into 17 via one operation: the binary form of 34 is 100010, if you add 0, reverse it and remove leading zeros, you will get 10001, which is the binary form of 17.
  * 81 can be turned into 69 via one operation: the binary form of 81 is 1010001, if you add 0, reverse it and remove leading zeros, you will get 1000101, which is the binary form of 69.
  * 34 can be turned into 69 via two operations: first you turn 34 into 81 and then 81 into 69.

Your task is to find out whether x can be turned into y after a certain number of operations (possibly zero).

Input

The only line of the input contains two integers x and y (1 ≤ x, y ≤ 10^{18}).

Output

Print YES if you can make x equal to y and NO if you can't.

Examples

Input

3 3

Output

YES

Input

7 4

Output

NO

Input

2 8

Output

NO

Input

34 69

Output

YES

Input

8935891487501725 71487131900013807

Output

YES

Note

In the first example, you don't even need to do anything.

The fourth example is described in the statement.


Question:
Monocarp plays a computer game (yet again!). This game has a unique trading mechanics.

To trade with a character, Monocarp has to choose one of the items he possesses and trade it for some item the other character possesses. Each item has an integer price. If Monocarp's chosen item has price x, then he can trade it for any item (exactly one item) with price not greater than x+k.

Monocarp initially has n items, the price of the i-th item he has is a_i. The character Monocarp is trading with has m items, the price of the i-th item they have is b_i. Monocarp can trade with this character as many times as he wants (possibly even zero times), each time exchanging one of his items with one of the other character's items according to the aforementioned constraints. Note that if Monocarp gets some item during an exchange, he can trade it for another item (since now the item belongs to him), and vice versa: if Monocarp trades one of his items for another item, he can get his item back by trading something for it.

You have to answer q queries. Each query consists of one integer, which is the value of k, and asks you to calculate the maximum possible total cost of items Monocarp can have after some sequence of trades, assuming that he can trade an item of cost x for an item of cost not greater than x+k during each trade. Note that the queries are independent: the trades do not actually occur, Monocarp only wants to calculate the maximum total cost he can get.

Input

The first line contains three integers n, m and q (1 ≤ n, m, q ≤ 2 ⋅ 10^5).

The second line contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^9) — the prices of the items Monocarp has.

The third line contains m integers b_1, b_2, ..., b_m (1 ≤ b_i ≤ 10^9) — the prices of the items the other character has.

The fourth line contains q integers, where the i-th integer is the value of k for the i-th query (0 ≤ k ≤ 10^9).

Output

For each query, print one integer — the maximum possible total cost of items Monocarp can have after some sequence of trades, given the value of k from the query.

Example

Input

3 4 5
10 30 15
12 31 14 18
0 1 2 3 4

Output

55
56
60
64
64


Question:
A string is called square if it is some string written twice in a row. For example, the strings "aa", "abcabc", "abab" and "baabaa" are square. But the strings "aaa", "abaaab" and "abcdabc" are not square.

For a given string s determine if it is square.

Input

The first line of input data contains an integer t (1 ≤ t ≤ 100) —the number of test cases.

This is followed by t lines, each containing a description of one test case. The given strings consist only of lowercase Latin letters and have lengths between 1 and 100 inclusive.

Output

For each test case, output on a separate line:

  * YES if the string in the corresponding test case is square,
  * NO otherwise.

You can output YES and NO in any case (for example, strings yEs, yes, Yes and YES will be recognized as a positive response).

Example

Input

10
a
aa
aaa
aaaa
abab
abcabc
abacaba
xxyy
xyyx
xyxy

Output

NO
YES
NO
YES
YES
YES
NO
NO
NO
YES

{"inputs": ["10\na\naa\naaa\naaaa\nabab\nabcabc\nabacaba\nxxyy\nxyyx\nxyxy\n", "1\nacascnakcn\n", "1\nababab\n", "1\nzz\n", "1\nacascnajcn\n", "10\na\naa\naaa\naaaa\nabab\nabcabc\nabacaba\nyxxy\nxyyx\nxyxy\n", "1\n{{\n", "10\nb\naa\naaa\naaaa\nabab\nabcabc\nabacaba\nyxxy\nxyxx\nxyxz\n", "10\nb\naa\naaa\nabaa\nabab\nabcabc\nabacaba\nyxxy\nxyxx\nxyxz\n", "10\nb\naa\naaa\nabaa\nabab\nabc`bc\nabacaba\nyxxy\nxyxx\nxyxz\n", "10\nb\naa\naaa\nab`a\nabab\ncb`caa\nabacbaa\nxyxy\nxyxw\nzxyx\n", "10\na\nba\naaa\nab`a\nabab\ncb`caa\nabacbaa\nyxyx\nxyxw\nzxyx\n", "10\na\nba\naaa\nab`a\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nzxyx\n", "10\nb\nb`\na``\n_aba\nabbb\ncca`ba\nabacbca\nxyxx\nxwyv\nyzxy\n", "10\nd\n`c\nbab\ncaa_\nbaba\nccabc`\n_baceac\nwxxy\nwuwy\nw|wz\n", "1\n`babab\n", "1\nz{\n", "1\nacascankcn\n", "1\n`babbb\n", "10\nb\naa\naaa\naaaa\nabab\nabcabc\nabacaba\nyxxy\nxyyx\nxyxy\n", "1\nacbscankcn\n", "1\n_babbb\n", "1\n{|\n", "10\nb\naa\naaa\naaaa\nabab\nabcabc\nabacaba\nyxxy\nxxyx\nxyxy\n", "1\nacbscakncn\n", "1\n_baabb\n", "1\n|{\n", "10\nb\naa\naaa\naaaa\nabab\nabcabc\nabacaba\nyxxy\nxyxx\nxyxy\n", "1\nabbscakncn\n", "1\n^baabb\n", "1\n||\n", "1\nabbscakmcn\n", "1\n^baacb\n", "1\nz|\n", "1\nncmkacsbba\n", "1\n^b`acb\n", "1\n|z\n", "1\nncmkacsbca\n", "1\nbca`b^\n", "1\nz}\n", "10\nc\naa\naaa\nabaa\nabab\nabc`bc\nabacaba\nyxxy\nxyxx\nxyxz\n", "1\nncmlacsbca\n", "1\nbca`b_\n", "1\n}z\n", "10\nc\naa\naaa\nabaa\nabab\nabc`bc\nabacaba\nyxxy\nxyxw\nxyxz\n", "1\nccmlansbca\n", "1\n`cabb_\n", "1\n{}\n", "10\nc\naa\naaa\nabaa\nabab\nabc`bc\nabacaaa\nyxxy\nxyxw\nxyxz\n", "1\nccmlamsbca\n", "1\n_bbac`\n", "1\n{z\n", "10\nc\naa\naaa\nabaa\nabab\nabc`bc\nabacbaa\nyxxy\nxyxw\nxyxz\n", "1\nbcmlamsbca\n", "1\n`bbac`\n", "1\nyz\n", "10\nc\naa\naaa\nabaa\nabab\naac`bc\nabacbaa\nyxxy\nxyxw\nxyxz\n", "1\nbcmlamsbda\n", "1\n`cabb`\n", "1\nzy\n", "10\nc\naa\naaa\nabaa\nabab\naac`bc\nabacbaa\nyxxy\nxyxw\nzxyx\n", "1\nbcmlaasbdm\n", "1\n`cabc`\n", "1\nzx\n", "10\nc\naa\naaa\nab`a\nabab\naac`bc\nabacbaa\nyxxy\nxyxw\nzxyx\n", "1\nmdbsaalmcb\n", "1\n_cabc`\n", "1\nxz\n", "10\nb\naa\naaa\nab`a\nabab\naac`bc\nabacbaa\nyxxy\nxyxw\nzxyx\n", "1\nmdbsaakmcb\n", "1\n_cbbc`\n", "1\nyy\n", "10\nb\naa\naaa\nab`a\nabab\ncb`caa\nabacbaa\nyxxy\nxyxw\nzxyx\n", "1\nmdbsaajmcb\n", "1\n_cbbd`\n", "1\ny{\n", "1\nbcmjaasbdm\n", "1\n`dbbc_\n", "1\ny|\n", "10\nb\naa\naaa\nab`a\nabab\ncb`caa\nabacbaa\nyxyx\nxyxw\nzxyx\n", "1\nbbmjaasbdm\n", "1\n`dbbb_\n", "1\nx|\n", "10\na\naa\naaa\nab`a\nabab\ncb`caa\nabacbaa\nyxyx\nxyxw\nzxyx\n", "1\nbdmjaasbbm\n", "1\nadbbb_\n", "1\nx}\n", "1\nbdmj`asbbm\n", "1\na_bbbd\n", "1\nw}\n", "10\na\nba\naaa\nab`a\nabab\ncb`caa\nabbcbaa\nyxyx\nxyxw\nzxyx\n", "1\nbdmj`ascbm\n", "1\na_cbbd\n", "1\n}w\n", "10\na\nba\naaa\nab`a\nabab\ncb`cab\nabbcbaa\nyxyx\nxyxw\nzxyx\n", "1\nbdma`jscbm\n", "1\na_cbcd\n", "1\n}x\n", "10\na\nba\naaa\nab`a\nabab\ncb`cab\nabbcbaa\nyxyx\nwyxw\nzxyx\n", "1\nbdm`ajscbm\n", "1\na_cbcc\n", "1\ny}\n", "10\na\nba\naaa\nab`a\nabab\ncb`caa\nabbcbaa\nyxyx\nwyxw\nzxyx\n", "1\nbdm`ajscbl\n", "1\na_cbbc\n", "1\n}y\n", "10\na\nba\naaa\nab`a\nabab\ncb`caa\nabbcbba\nyxyx\nwyxw\nzxyx\n", "1\nbdl`ajscbl\n", "1\na_cabc\n", "1\n~y\n", "1\nbbl`ajscdl\n", "1\na`cabc\n", "1\ny~\n", "10\na\nba\naaa\nab`a\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nzyxx\n", "1\nldcsja`lbb\n", "1\na`cbbc\n", "1\ny\n", "10\na\nba\naaa\na`ba\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nzyxx\n", "1\nldcrja`lbb\n", "1\naacbbc\n", "1\ny\n", "10\na\nba\naaa\na`ba\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nzyxy\n", "1\nldcrja`lab\n", "1\naacbbb\n", "1\nx\n", "10\na\nb`\naaa\na`ba\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nzyxy\n", "1\nlddrja`lab\n", "1\naadbbb\n", "1\nx~\n", "10\na\nb`\naa`\na`ba\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nzyxy\n", "1\nbal`ajrddl\n", "1\naaebbb\n", "1\nz~\n", "10\na\nb`\naa`\na`ba\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nyzxy\n", "1\ncal`ajrddl\n", "1\naaebab\n", "1\n~z\n", "10\nb\nb`\naa`\na`ba\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nyzxy\n", "1\nlddrja`lac\n", "1\nbabeaa\n", "1\nz\n", "10\nb\nb`\na``\na`ba\nbaab\ncb`caa\nabbcbba\nyxyx\nwyxw\nyzxy\n", "1\nmddrja`lac\n", "1\naabeaa\n", "1\nz\n", "10\nb\nb`\na``\na`ba\nbaab\ncb`caa\nabbcbba\nyxyx\nwyyw\nyzxy\n", "1\ncal`ajrddm\n", "1\naaebaa\n", "10\nb\nb`\na``\na`ba\nbaab\nab`cac\nabbcbba\nyxyx\nwyyw\nyzxy\n", "1\ncal`ajqddm\n", "1\nbaebaa\n", "10\nb\nb`\na``\na`ba\nbaab\ncac`ba\nabbcbba\nyxyx\nwyyw\nyzxy\n", "1\ncal`aiqddm\n", "1\naabeab\n", "10\nb\nb`\na``\na_ba\nbaab\ncac`ba\nabbcbba\nyxyx\nwyyw\nyzxy\n", "1\nmddqia`lac\n", "1\nbaebab\n", "10\nb\nb`\na``\na_ba\nbaab\nab`cac\nabbcbba\nyxyx\nwyyw\nyzxy\n", "1\nmcdqia`lad\n", "1\nbafbab\n", "10\nb\nb`\na``\na_ba\nbaab\nab`cac\nabbcbba\nxyxy\nwyyw\nyzxy\n", "1\nmcdqia`mad\n", "1\nbagbab\n", "10\nb\nb`\na``\na_ba\nbaab\nab`cac\nabbcbba\nxyxy\nwyxw\nyzxy\n", "1\ndam`aiqdcm\n", "1\nbagbaa\n", "10\nb\nb`\na``\na_ba\nbaab\ncac`ba\nabbcbba\nxyxy\nwyxw\nyzxy\n", "1\nd`m`aiqdcm\n", "1\naagbba\n", "10\nb\nb`\na``\na_ba\nbaab\ncca`ba\nabbcbba\nxyxy\nwyxw\nyzxy\n", "1\nd`c`aiqdmm\n", "1\na`gbba\n", "10\nb\nb`\na``\na_ba\nbaab\ncca`ba\nabbcbba\nxyxy\nwxyw\nyzxy\n", "1\nd`b`aiqdmm\n", "1\na`gbb`\n", "10\nb\nb`\na``\na_ba\nabab\ncca`ba\nabbcbba\nxyxy\nwxyw\nyzxy\n", "1\nm`b`aiqddm\n", "1\na`gb`b\n", "10\nb\nb`\na``\na_ba\nabab\ncca`ba\nabbcbba\nxyxy\nwyxw\nyzxy\n", "1\nm`c`aiqddm\n", "1\na`hb`b\n", "10\nb\nb`\na``\na_ba\nabab\ncca`ba\nabacbba\nxyxy\nwyxw\nyzxy\n", "1\nmac`aiqddm\n", "1\nb`hb`b\n", "10\nb\n`b\na``\na_ba\nabab\ncca`ba\nabacbba\nxyxy\nwyxw\nyzxy\n", "1\nnac`aiqddm\n", "1\na`hbab\n", "10\nb\n`b\na``\na_ba\nabab\ncca`ba\nabacbca\nxyxy\nwyxw\nyzxy\n", "1\nmddqia`can\n", "1\na_hbab\n", "10\nb\n`b\na``\na_ba\nabab\ncca`ba\nabacbca\nxyxy\nwxyw\nyzxy\n", "1\naddqia`cmn\n", "1\nbabh_a\n", "10\nb\n`b\na``\na_ba\nabbb\ncca`ba\nabacbca\nxyxy\nwxyw\nyzxy\n", "1\naddqia`cnn\n", "1\nbabh^a\n", "10\nb\n`b\na``\na_ba\nabbb\ncca`ba\nabacbca\nxyxy\nwxyv\nyzxy\n", "1\nnnc`aiqdda\n", "1\nbbbh^a\n", "10\nb\n`b\na``\na_ba\nabbb\ncca`ba\nabacbca\nxyxy\nxwyv\nyzxy\n", "1\nnnc`ajqdda\n", "1\nabbh^b\n", "10\nb\n`b\na``\n_aba\nabbb\ncca`ba\nabacbca\nxyxy\nxwyv\nyzxy\n", "1\naddqja`cnn\n"], "outputs": ["NO\nYES\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nYES\n", "NO\n", "NO\n", "YES\n", "NO\n", "NO\nYES\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nYES\n", "YES\n", "NO\nYES\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nNO\n", "NO\nYES\nNO\nNO\nYES\nYES\nNO\nNO\nNO\nNO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nNO\nNO\nNO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nYES\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nYES\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nYES\nYES\nYES\nNO\nNO\nNO\nYES\n", "NO\n", "NO\n", "YES\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "YES\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nYES\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n", "NO\n", "NO\nNO\nNO\nNO\nNO\nNO\nNO\nYES\nNO\nNO\n", "NO\n"]}


Question:
Polycarp likes squares and cubes of positive integers. Here is the beginning of the sequence of numbers he likes: 1, 4, 8, 9, ....

For a given number n, count the number of integers from 1 to n that Polycarp likes. In other words, find the number of such x that x is a square of a positive integer number or a cube of a positive integer number (or both a square and a cube simultaneously).

Input

The first line contains an integer t (1 ≤ t ≤ 20) — the number of test cases.

Then t lines contain the test cases, one per line. Each of the lines contains one integer n (1 ≤ n ≤ 10^9).

Output

For each test case, print the answer you are looking for — the number of integers from 1 to n that Polycarp likes.

Example

Input

6
10
1
25
1000000000
999999999
500000000

Output

4
1
6
32591
32590
23125


Question:
Tanya is learning how to add numbers, but so far she is not doing it correctly. She is adding two numbers a and b using the following algorithm:

  1. If one of the numbers is shorter than the other, Tanya adds leading zeros so that the numbers are the same length.
  2. The numbers are processed from right to left (that is, from the least significant digits to the most significant).
  3. In the first step, she adds the last digit of a to the last digit of b and writes their sum in the answer.
  4. At each next step, she performs the same operation on each pair of digits in the same place and writes the result to the left side of the answer.

For example, the numbers a = 17236 and b = 3465 Tanya adds up as follows:

$$$ \large{ \begin{array}{r} + \begin{array}{r} 17236\\\ 03465\\\ \end{array} \\\ \hline \begin{array}{r} 1106911 \end{array} \end{array}} $$$

  * calculates the sum of 6 + 5 = 11 and writes 11 in the answer.
  * calculates the sum of 3 + 6 = 9 and writes the result to the left side of the answer to get 911.
  * calculates the sum of 2 + 4 = 6 and writes the result to the left side of the answer to get 6911.
  * calculates the sum of 7 + 3 = 10, and writes the result to the left side of the answer to get 106911.
  * calculates the sum of 1 + 0 = 1 and writes the result to the left side of the answer and get 1106911.

As a result, she gets 1106911.

You are given two positive integers a and s. Find the number b such that by adding a and b as described above, Tanya will get s. Or determine that no suitable b exists.

Input

The first line of input data contains an integer t (1 ≤ t ≤ 10^4) — the number of test cases.

Each test case consists of a single line containing two positive integers a and s (1 ≤ a < s ≤ 10^{18}) separated by a space.

Output

For each test case print the answer on a separate line.

If the solution exists, print a single positive integer b. The answer must be written without leading zeros. If multiple answers exist, print any of them.

If no suitable number b exists, output -1.

Example

Input

6
17236 1106911
1 5
108 112
12345 1023412
1 11
1 20

Output

3465
4
-1
90007
10
-1

Note

The first test case is explained in the main part of the statement.

In the third test case, we cannot choose b that satisfies the problem statement.


Question:
Vlad has n friends, for each of whom he wants to buy one gift for the New Year.

There are m shops in the city, in each of which he can buy a gift for any of his friends. If the j-th friend (1 ≤ j ≤ n) receives a gift bought in the shop with the number i (1 ≤ i ≤ m), then the friend receives p_{ij} units of joy. The rectangular table p_{ij} is given in the input.

Vlad has time to visit at most n-1 shops (where n is the number of friends). He chooses which shops he will visit and for which friends he will buy gifts in each of them.

Let the j-th friend receive a_j units of joy from Vlad's gift. Let's find the value α=min\\{a_1, a_2, ..., a_n\}. Vlad's goal is to buy gifts so that the value of α is as large as possible. In other words, Vlad wants to maximize the minimum of the joys of his friends.

For example, let m = 2, n = 2. Let the joy from the gifts that we can buy in the first shop: p_{11} = 1, p_{12}=2, in the second shop: p_{21} = 3, p_{22}=4.

Then it is enough for Vlad to go only to the second shop and buy a gift for the first friend, bringing joy 3, and for the second — bringing joy 4. In this case, the value α will be equal to min\{3, 4\} = 3

Help Vlad choose gifts for his friends so that the value of α is as high as possible. Please note that each friend must receive one gift. Vlad can visit at most n-1 shops (where n is the number of friends). In the shop, he can buy any number of gifts.

Input

The first line of the input contains an integer t (1 ≤ t ≤ 10^4) — the number of test cases in the input.

An empty line is written before each test case. Then there is a line containing integers m and n (2 ≤ n, 2 ≤ n ⋅ m ≤ 10^5) separated by a space — the number of shops and the number of friends, where n ⋅ m is the product of n and m.

Then m lines follow, each containing n numbers. The number in the i-th row of the j-th column p_{ij} (1 ≤ p_{ij} ≤ 10^9) is the joy of the product intended for friend number j in shop number i.

It is guaranteed that the sum of the values n ⋅ m over all test cases in the test does not exceed 10^5.

Output

Print t lines, each line must contain the answer to the corresponding test case — the maximum possible value of α, where α is the minimum of the joys from a gift for all of Vlad's friends.

Example

Input

5

2 2
1 2
3 4

4 3
1 3 1
3 1 1
1 2 2
1 1 3

2 3
5 3 4
2 5 1

4 2
7 9
8 1
9 6
10 8

2 4
6 5 2 1
7 9 7 2

Output

3
2
4
8
2


Question:
Dmitry has an array of n non-negative integers a_1, a_2, ..., a_n.

In one operation, Dmitry can choose any index j (1 ≤ j ≤ n) and increase the value of the element a_j by 1. He can choose the same index j multiple times.

For each i from 0 to n, determine whether Dmitry can make the MEX of the array equal to exactly i. If it is possible, then determine the minimum number of operations to do it.

The MEX of the array is equal to the minimum non-negative integer that is not in the array. For example, the MEX of the array [3, 1, 0] is equal to 2, and the array [3, 3, 1, 4] is equal to 0.

Input

The first line of input data contains a single integer t (1 ≤ t ≤ 10^4) — the number of test cases in the input.

The descriptions of the test cases follow.

The first line of the description of each test case contains a single integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the length of the array a.

The second line of the description of each test case contains n integers a_1, a_2, ..., a_n (0 ≤ a_i ≤ n) — elements of the array a.

It is guaranteed that the sum of the values n over all test cases in the test does not exceed 2⋅10^5.

Output

For each test case, output n + 1 integer — i-th number is equal to the minimum number of operations for which you can make the array MEX equal to i (0 ≤ i ≤ n), or -1 if this cannot be done.

Example

Input

5
3
0 1 3
7
0 1 2 3 4 3 2
4
3 0 0 0
7
4 6 2 3 5 0 5
5
4 0 1 0 4

Output

1 1 0 -1
1 1 2 2 1 0 2 6
3 0 1 4 3
1 0 -1 -1 -1 -1 -1 -1
2 1 0 2 -1 -1

Note

In the first set of example inputs, n=3:

  * to get MEX=0, it is enough to perform one increment: a_1++;
  * to get MEX=1, it is enough to perform one increment: a_2++;
  * MEX=2 for a given array, so there is no need to perform increments;
  * it is impossible to get MEX=3 by performing increments.


Question:
The Hat is a game of speedy explanation/guessing words (similar to Alias). It's fun. Try it! In this problem, we are talking about a variant of the game when the players are sitting at the table and everyone plays individually (i.e. not teams, but individual gamers play).

n people gathered in a room with m tables (n ≥ 2m). They want to play the Hat k times. Thus, k games will be played at each table. Each player will play in k games.

To do this, they are distributed among the tables for each game. During each game, one player plays at exactly one table. A player can play at different tables.

Players want to have the most "fair" schedule of games. For this reason, they are looking for a schedule (table distribution for each game) such that:

  * At any table in each game there are either ⌊n/m⌋ people or ⌈n/m⌉ people (that is, either n/m rounded down, or n/m rounded up). Different numbers of people can play different games at the same table.
  * Let's calculate for each player the value b_i — the number of times the i-th player played at a table with ⌈n/m⌉ persons (n/m rounded up). Any two values of b_imust differ by no more than 1. In other words, for any two players i and j, it must be true |b_i - b_j| ≤ 1.

For example, if n=5, m=2 and k=2, then at the request of the first item either two players or three players should play at each table. Consider the following schedules:

  * First game: 1, 2, 3 are played at the first table, and 4, 5 at the second one. The second game: at the first table they play 5, 1, and at the second — 2, 3, 4. This schedule is not "fair" since b_2=2 (the second player played twice at a big table) and b_5=0 (the fifth player did not play at a big table).
  * First game: 1, 2, 3 are played at the first table, and 4, 5 at the second one. The second game: at the first table they play 4, 5, 2, and at the second one — 1, 3. This schedule is "fair": b=[1,2,1,1,1] (any two values of b_i differ by no more than 1).

Find any "fair" game schedule for n people if they play on the m tables of k games.

Input

The first line of the input contains an integer t (1 ≤ t ≤ 10^4) — the number of test cases in the test.

Each test case consists of one line that contains three integers n, m and k (2 ≤ n ≤ 2⋅10^5, 1 ≤ m ≤ ⌊n/2⌋, 1 ≤ k ≤ 10^5) — the number of people, tables and games, respectively.

It is guaranteed that the sum of nk (n multiplied by k) over all test cases does not exceed 2⋅10^5.

Output

For each test case print a required schedule — a sequence of k blocks of m lines. Each block corresponds to one game, a line in a block corresponds to one table. In each line print the number of players at the table and the indices of the players (numbers from 1 to n) who should play at this table.

If there are several required schedules, then output any of them. We can show that a valid solution always exists.

You can output additional blank lines to separate responses to different sets of inputs.

Example

Input

3
5 2 2
8 3 1
2 1 3

Output

3 1 2 3
2 4 5
3 4 5 2
2 1 3

2 6 2
3 3 5 1
3 4 7 8

2 2 1
2 2 1
2 2 1


Question:
Polycarp is very fond of playing the game Minesweeper. Recently he found a similar game and there are such rules.

There are mines on the field, for each the coordinates of its location are known (x_i, y_i). Each mine has a lifetime in seconds, after which it will explode. After the explosion, the mine also detonates all mines vertically and horizontally at a distance of k (two perpendicular lines). As a result, we get an explosion on the field in the form of a "plus" symbol ('+'). Thus, one explosion can cause new explosions, and so on.

Also, Polycarp can detonate anyone mine every second, starting from zero seconds. After that, a chain reaction of explosions also takes place. Mines explode instantly and also instantly detonate other mines according to the rules described above.

Polycarp wants to set a new record and asks you to help him calculate in what minimum number of seconds all mines can be detonated.

Input

The first line of the input contains an integer t (1 ≤ t ≤ 10^4) — the number of test cases in the test.

An empty line is written in front of each test suite.

Next comes a line that contains integers n and k (1 ≤ n ≤ 2 ⋅ 10^5, 0 ≤ k ≤ 10^9) — the number of mines and the distance that hit by mines during the explosion, respectively.

Then n lines follow, the i-th of which describes the x and y coordinates of the i-th mine and the time until its explosion (-10^9 ≤ x, y ≤ 10^9, 0 ≤ timer ≤ 10^9). It is guaranteed that all mines have different coordinates.

It is guaranteed that the sum of the values n over all test cases in the test does not exceed 2 ⋅ 10^5.

Output

Print t lines, each of the lines must contain the answer to the corresponding set of input data — the minimum number of seconds it takes to explode all the mines.

Example

Input

3

5 0
0 0 1
0 1 4
1 0 2
1 1 3
2 2 9

5 2
0 0 1
0 1 4
1 0 2
1 1 3
2 2 9

6 1
1 -1 3
0 -1 9
0 1 7
-1 0 1
-1 1 9
-1 -1 7

Output

2
1
0

Note

<image> Picture from examples

First example:

  * 0 second: we explode a mine at the cell (2, 2), it does not detonate any other mine since k=0.
  * 1 second: we explode the mine at the cell (0, 1), and the mine at the cell (0, 0) explodes itself.
  * 2 second: we explode the mine at the cell (1, 1), and the mine at the cell (1, 0) explodes itself.

Second example:

  * 0 second: we explode a mine at the cell (2, 2) we get:

<image>

  * 1 second: the mine at coordinate (0, 0) explodes and since k=2 the explosion detonates mines at the cells (0, 1) and (1, 0), and their explosions detonate the mine at the cell (1, 1) and there are no mines left on the field.


Question:
You are given a permutation p of n elements. A permutation of n elements is an array of length n containing each integer from 1 to n exactly once. For example, [1, 2, 3] and [4, 3, 5, 1, 2] are permutations, but [1, 2, 4] and [4, 3, 2, 1, 2] are not permutations. You should perform q queries.

There are two types of queries:

  * 1 x y — swap p_x and p_y.
  * 2 i k — print the number that i will become if we assign i = p_i k times.

Input

The first line contains two integers n and q (1 ≤ n, q ≤ 10^5).

The second line contains n integers p_1, p_2, ..., p_n.

Each of the next q lines contains three integers. The first integer is t (1 ≤ t ≤ 2) — type of query. If t = 1, then the next two integers are x and y (1 ≤ x, y ≤ n; x ≠ y) — first-type query. If t = 2, then the next two integers are i and k (1 ≤ i, k ≤ n) — second-type query.

It is guaranteed that there is at least one second-type query.

Output

For every second-type query, print one integer in a new line — answer to this query.

Examples

Input

5 4
5 3 4 2 1
2 3 1
2 1 2
1 1 3
2 1 2

Output

4
1
2

Input

5 9
2 3 5 1 4
2 3 5
2 5 5
2 5 1
2 5 3
2 5 4
1 5 4
2 5 3
2 2 5
2 5 1

Output

3
5
4
2
3
3
3
1

Note

In the first example p = \{5, 3, 4, 2, 1\}.

The first query is to print p_3. The answer is 4.

The second query is to print p_{p_1}. The answer is 1.

The third query is to swap p_1 and p_3. Now p = \{4, 3, 5, 2, 1\}.

The fourth query is to print p_{p_1}. The answer is 2.


Question:
You had n positive integers a_1, a_2, ..., a_n arranged in a circle. For each pair of neighboring numbers (a_1 and a_2, a_2 and a_3, ..., a_{n - 1} and a_n, and a_n and a_1), you wrote down: are the numbers in the pair equal or not.

Unfortunately, you've lost a piece of paper with the array a. Moreover, you are afraid that even information about equality of neighboring elements may be inconsistent. So, you are wondering: is there any array a which is consistent with information you have about equality or non-equality of corresponding pairs?

Input

The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases. Next t cases follow.

The first and only line of each test case contains a non-empty string s consisting of characters E and/or N. The length of s is equal to the size of array n and 2 ≤ n ≤ 50. For each i from 1 to n:

  * if s_i = E then a_i is equal to a_{i + 1} (a_n = a_1 for i = n);
  * if s_i = N then a_i is not equal to a_{i + 1} (a_n ≠ a_1 for i = n).

Output

For each test case, print YES if it's possible to choose array a that are consistent with information from s you know. Otherwise, print NO.

It can be proved, that if there exists some array a, then there exists an array a of positive integers with values less or equal to 10^9.

Example

Input

4
EEE
EN
ENNEENE
NENN

Output

YES
NO
YES
YES

Note

In the first test case, you can choose, for example, a_1 = a_2 = a_3 = 5.

In the second test case, there is no array a, since, according to s_1, a_1 is equal to a_2, but, according to s_2, a_2 is not equal to a_1.

In the third test case, you can, for example, choose array a = [20, 20, 4, 50, 50, 50, 20].

In the fourth test case, you can, for example, choose a = [1, 3, 3, 7].


Question:
A rectangle with its opposite corners in (0, 0) and (w, h) and sides parallel to the axes is drawn on a plane.

You are given a list of lattice points such that each point lies on a side of a rectangle but not in its corner. Also, there are at least two points on every side of a rectangle.

Your task is to choose three points in such a way that:

  * exactly two of them belong to the same side of a rectangle;
  * the area of a triangle formed by them is maximum possible.

Print the doubled area of this triangle. It can be shown that the doubled area of any triangle formed by lattice points is always an integer.

Input

The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of testcases.

The first line of each testcase contains two integers w and h (3 ≤ w, h ≤ 10^6) — the coordinates of the corner of a rectangle.

The next two lines contain the description of the points on two horizontal sides. First, an integer k (2 ≤ k ≤ 2 ⋅ 10^5) — the number of points. Then, k integers x_1 < x_2 < ... < x_k (0 < x_i < w) — the x coordinates of the points in the ascending order. The y coordinate for the first line is 0 and for the second line is h.

The next two lines contain the description of the points on two vertical sides. First, an integer k (2 ≤ k ≤ 2 ⋅ 10^5) — the number of points. Then, k integers y_1 < y_2 < ... < y_k (0 < y_i < h) — the y coordinates of the points in the ascending order. The x coordinate for the first line is 0 and for the second line is w.

The total number of points on all sides in all testcases doesn't exceed 2 ⋅ 10^5.

Output

For each testcase print a single integer — the doubled maximum area of a triangle formed by such three points that exactly two of them belong to the same side.

Example

Input

3
5 8
2 1 2
3 2 3 4
3 1 4 6
2 4 5
10 7
2 3 9
2 1 7
3 1 3 4
3 4 5 6
11 5
3 1 6 8
3 3 6 8
3 1 3 4
2 2 4

Output

25
42
35

Note

The points in the first testcase of the example:

  * (1, 0), (2, 0);
  * (2, 8), (3, 8), (4, 8);
  * (0, 1), (0, 4), (0, 6);
  * (5, 4), (5, 5).

The largest triangle is formed by points (0, 1), (0, 6) and (5, 4) — its area is 25/2. Thus, the doubled area is 25. Two points that are on the same side are: (0, 1) and (0, 6).