Problem: The evil mastermind, Moriarty, strikes again!  He sent Sherlock an image of a wall, with N integers painted on it. Sherlock is asked to solve the puzzle and find the next clue.
Sherlock knows that Moriarty is a deceitful person. All the numbers painted on the wall are not valid. Only the numbers that are Coprime with the integer X are valid, and the rest are a deceit. Help Sherlock find the valid integers from the given array A so that he can track down Moriarty.  

Input:
First line contains T. T test cases follow.
First line of each test case contains two space-separated integers N and X.
Second line of each test case contains N space-separated integers, forming the array A. 

Output:
Print the valid integers separated by spaces in the order that they appear in the list or "-1" (without the quotes) if there are no valid integers, in a new line for each test case.  

Constraints:
1 ≤ T ≤ 10
1 ≤ N ≤ 10^4
2 ≤ Ai, X ≤ 10^7

SAMPLE INPUT
1
5 4
2 5 8 3 13

SAMPLE OUTPUT
5 3 13

Solution (in PYTHON):

Solution:
def gcd(u, v):
    assert u > 1 and u <= pow(10,7)
    if (((u | v) & 1) == 0):
        return False
    while ((u & 1) == 0): u >>= 1;
    if (u == 1):
        return True;
    while (v != 0):
        while ((v & 1) == 0): v >>= 1;
        if (v == 1):
            return True
        if (u > v):
            t = v;
            v = u;
            u = t;
        v -= u;
    return False
T = input()
assert T > 0 and T <= 10
for _ in range(T):
    N, X = map(int, raw_input().split())
    assert N > 0 and N <= pow(10, 4) and X > 1 and X <= pow(10, 7)
    na = map(int, raw_input().split())
    count = 0
    for j in na:
        if gcd(j, X) == True:
            print j,
            count += 1
    if count == 0:
        print -1,
    print ''