Naturally, the magical girl is very good at performing magic. She recently met her master wizard Devu, who gifted her R potions of red liquid, 
B potions of blue liquid, and G potions of green liquid.

- 
The red liquid potions have liquid amounts given by r[1], ..., r[R] liters. 

- 
The green liquid potions have liquid amounts given by g[1], ..., g[G] liters. 

- 
The blue liquid potions have liquid amounts given by b[1], ..., b[B] liters. 

She want to play with the potions by applying magic tricks on them. In a single magic trick, she will choose a particular color. Then she will pick all the potions of the chosen color and decrease the amount of liquid in them to half (i.e. if initial amount 
of liquid is x, then the amount after decrement will be x / 2  where division is integer division, e.g. 3 / 2 = 1 and 4 / 2 = 2). 

Because she has to go out of station to meet her uncle Churu, a wannabe wizard, only M minutes are left for her. In a single minute, she can perform at most one magic trick. Hence, she can perform at most M magic tricks.

She would like to minimize the maximum amount of liquid among all of Red, Green and Blue colored potions. Formally Let v be the maximum value of amount of liquid in any potion. We want to minimize the value of v.
Please help her.

-----Input-----

First line of the input contains an integer T denoting the number of test cases.
Then for each test case, we have four lines.

The first line contains four space separated integers R, G, B, M. The next 3 lines will describe the amount of different color liquids (r, g, b), which are separated by space.

-----Output-----
For each test case, print a single integer denoting the answer of the problem.

-----Constraints-----
-  1 ≤ T ≤ 1000 
-  1 ≤ R, G, B, M ≤ 100 
-  1 ≤ r[i], g[i], b[i] ≤ 10^9 

-----Example-----
Input:
3
1 1 1 1
1
2
3
1 1 1 1
2
4
6
3 2 2 2
1 2 3
2 4
6 8
Output:
2
4
4

-----Explanation-----
Example case 1. Magical girl can pick the blue potion and make its liquid amount half. So the potions will now have amounts 1 2 1. Maximum of these values is 2. Hence answer is 2.

```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 = 'for j in range(int(input())):\n r,g,b,m=map(int,input().split())\n x=[]\n for i in range(3):\n  a=list(map(int,input().split()))\n  x.append(a)\n while(m!=0):\n  c=[]\n  for i in x:\n   c.append(max(i))\n  z=c.index(max(c))\n  for i in range(len(x[z])):\n   x[z][i]=x[z][i]//2\n  m-=1\n am=[]\n for i in x:\n  am+=i\n print(max(am))'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13409