Tara was completing an Algorithms assignment and got stuck on a question. She thought of who can help her, and got reminded of Kabir who has good problem solving skills. The question is:
Given N$N$ the number of elements in the sequence A1$A_1$,A2$A_2$ … An$A_n$. Find out the prime factor which occurred maximum number of times among the largest prime factor corresponding to each element. if there are more than one such prime factors print the largest one.
You are friends with Kabir, help him to solve the problem for Tara.

-----Input:-----
- The first line of the input contains a single integer T$T$ denoting the number of test cases. The description of T test cases follows. 
- First line of each test case contains N$N$, the number of elements in the sequence.
- Second line contains N space separated elements A1$A_1$,A2$A_2$ … An$A_n$.

-----Output:-----
- For each test case, print a single line, the number which occurs maximum number of times from the largest prime factor corresponding to each element.

-----Constraints-----
- 1≤T≤10$1 \leq T \leq 10$
- 1≤N≤105$1 \leq N \leq 10^5$
- 2≤A[i]≤105$2 \leq A[i] \leq 10^5$

-----Sample Input:-----
1
7

3 2 15 6 8 5 10

-----Sample Output:-----
5

-----EXPLANATION:-----
The largest prime factors of numbers are:
3 2  5  3  2  5  5 , of which 5 is most frequent.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '# cook your dish here\n"""def power(x, y): \n    res = 1\n    x=x\n    while (y > 0): \n        if ((y & 1) == 1) : \n            res = (res * x) \n        y = y >> 1\n        x = (x * x)\n    return res""" \n"""def fact(n):\n    if(n==0):\n        return 1\n    if(n==1):\n        return 1\n    return fact(n-1)+fact(n-2)"""\n\ndef maxPrimeFactors (n): \n    Prime = -1\n    while n % 2 == 0: \n        Prime = 2\n        n >>= 1  \n    for i in range(3, int(math.sqrt(n)) + 1, 2): \n        while n % i == 0: \n            Prime = i \n            n = n / i \n    if n > 2: \n        Prime = n \n    return int(Prime)\n#import collections\nimport math\narray=[0]*100001\nfor i in range(1,100001):\n    array[i]=maxPrimeFactors(i)\nt=int(input())\nfor _ in range(t):\n    n=int(input())\n    #b,g=map(int,input().split())\n    #x2,y2=map(int,input().split())\n    arr=list(map(int,input().split()))\n    #m,k=map(int,input().split())\n    d={}\n    for i in range(n):\n        prime_fact=array[arr[i]]\n        if prime_fact not in d:\n            d[prime_fact]=1\n        else:\n            d[prime_fact]+=1\n    maxCount=max(d.values())\n    ans=-1\n    for i in d:\n        if(d[i]==maxCount):\n            if(i>=ans):\n              ans=i\n    print(ans)\n    \n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 2988253