On a planet called RUIZ LAND, which is ruled by the queen, Erika Ruiz. Each person on that planet has a strength value (strength value >0).
That planet has a special rule made by the queen that a boy and a girl will form a couple if their Hate value is a prime number where $Hate$ is given by the formula:-
Hate = (boy's strength value)  XOR (girl's strength value )
You are given $N$ numbers denoting the strength value of $N$ girls, and each of the $N$ girls has to form a couple with a boy such that sum of $Hate$ value of all the $N$ couples will be minimum.
You need to print the strength value of each boy, Where the boy at index $i$ will form a couple with the girl at index $i$, where $1 \leq i \leq N$.
Assume that you can always find at least one boy having that strength for each girl.

-----Input:-----
- First line will contain $N$, the number of Girls. 
- Next line contains $N$ numbers separated by space denoting strength value for each girl.

-----Output:-----
Print the required $N$ numbers denoting strength of boys.

-----Constraints-----
- $1 \leq N \leq 100000$
- $1 \leq A_i \leq 10^9$ , (where $1 \leq i \leq N$) and $A_i$ denotes strength of i'th girl.

-----Sample Input:-----
2
10 16

-----Sample Output:-----
8 18

```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 = '# author : Tapan Goyal\r\n#           MNIT Jaipur\r\n\r\nimport math\r\nimport bisect\r\nimport itertools\r\nimport sys\r\nI=lambda : sys.stdin.readline()\r\none=lambda : int(I())\r\nmore=lambda : map(int,I().split())\r\nlinput=lambda : list(more())\r\n\r\nmod=10**9 +7\r\ninf=10**18 + 1 \r\n\r\n\'\'\'fact=[1]*100001\r\nifact=[1]*100001\r\nfor i in range(1,100001):\r\n    fact[i]=((fact[i-1])*i)%mod\r\n    ifact[i]=((ifact[i-1])*pow(i,mod-2,mod))%mod\r\ndef ncr(n,r):\r\n    return (((fact[n]*ifact[n-r])%mod)*ifact[r])%mod\r\ndef npr(n,r):\r\n    return (((fact[n]*ifact[n-r])%mod))\r\n    \'\'\'\r\n\r\n\r\ndef merge(a,b):\r\n    i=0;j=0\r\n    c=0\r\n    ans=[]\r\n    while i<len(a) and j<len(b):\r\n        if a[i]<b[j]:\r\n            ans.append(a[i])\r\n            i+=1\r\n        else:\r\n            ans.append(b[j])\r\n            c+=len(a)-i\r\n            j+=1\r\n    ans+=a[i:]\r\n    ans+=b[j:]\r\n    return ans,c\r\ndef mergesort(a):\r\n    if len(a)==1:\r\n        return a,0\r\n    mid=len(a)//2   \r\n    left,left_inversion=mergesort(a[:mid])\r\n    right,right_inversion=mergesort(a[mid:])\r\n    m,c=merge(left,right)\r\n    c+=(left_inversion+right_inversion)\r\n    return m,c\r\n    \r\ndef is_prime(num):\r\n    if num == 1: return False\r\n    if num == 2: return True\r\n    if num == 3: return True\r\n    if num%2 == 0: return False\r\n    if num%3 == 0: return False\r\n    t = 5\r\n    a = 2\r\n    while t <= int(math.sqrt(num)):\r\n        if num%t == 0: return False\r\n        t += a\r\n        a = 6 - a\r\n    return True\r\n\r\n  \r\ndef ceil(a,b):\r\n    return (a+b-1)//b\r\n    \r\n\r\n\r\n#/////////////////////////////////////////////////////////////////////////////////////////////////\r\ndef __starting_point():\r\n    for _ in range(1):\r\n        n=one()\r\n        a=linput()\r\n        for i in a:\r\n            ans=i^2\r\n            if ans>0:\r\n                print(ans,end=" ")\r\n            else:\r\n                print(i^3,end=" ")\r\n                \r\n            \n__starting_point()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 15163