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 = 'def prime(num):\r\n  if n>1:\r\n   for i in range(2, int(num**0.5)+1): \r\n         \r\n       # If num is divisible by any number between  \r\n       # 2 and n / 2, it is not prime  \r\n       if (num % i) == 0: \r\n           return False\r\n           break\r\n   else: \r\n       return True\r\n  \r\n  else: \r\n   return False\r\nt=int(input())\r\nfor k in range(t):\r\n    n=int(input())\r\n    a=[0]*n\r\n    l=list(map(int,input().split()))\r\n    s=max(l)\r\n    a1=[0]*(s+1)\r\n    i=2\r\n    while(i<=s):\r\n        if (prime(i)):\r\n         for j in range(i,s+1,i):\r\n            a1[j]=i\r\n        i+=1\r\n    for j in range(n):\r\n        a[j]=a1[l[j]]\r\n    a.sort()\r\n    ti=1\r\n    ma=1\r\n    nu=a[0]\r\n    for j in range(1,n):\r\n        if a[j]==a[j-1]:\r\n            ti+=1\r\n        else:\r\n            if ti>=ma:\r\n                ma=ti\r\n                nu=a[j-1]\r\n                \r\n            ti=1\r\n    if ti>=ma:\r\n        ma=ti\r\n        nu=a[n-1]\r\n        \r\n    print(nu)\r\n    \r\n        \r\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13571