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 = '# cook your dish here\r\n# cook your dish here\r\ndef solve():\r\n  k = int(input())\r\n    #n,m = input().split()\r\n    #n = int(n)\r\n    #m = int(m)\r\n    #s = input()\r\n  a = list(map(int, input().split()))\r\n  #print(a)\r\n  for i in range(k):\r\n    n2=-1\r\n    if a[i]==1 :n2 =3\r\n    elif a[i]==2 :n2 =1\r\n    else:\r\n      b = bin(a[i]).replace("0b","")\r\n      n = len(b)\r\n      #print(b)\r\n      if b[n-2]==\'0\': b=b[0:n-2]+\'1\'+b[n-1:]\r\n      else: b=b[0:n-2]+\'0\'+b[n-1:]\r\n      #print(b)\r\n      n2 = int(b,2)\r\n    #print(n2)\r\n    if i==k-1:print(n2,end="")\r\n    else: print(n2,end=" ")\r\n        \r\n            \r\n    \r\n    \r\ndef __starting_point():\r\n    #T = int(input())\r\n    #for i in range(T):\r\n        #a = solve()\r\n        #n = len(a)\r\n        #for i in range(n):\r\n         #   if i==n-1 : print(a[i])\r\n          #  else: print(a[i],end=" ")\r\n        (solve())\n__starting_point()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14125