The Little Elephant loves lucky strings. Everybody knows that the lucky string is a string of digits that contains only the lucky digits 4 and 7. For example, strings "47", "744", "4" are lucky while "5", "17", "467" are not.

The Little Elephant has the strings A and B of digits. These strings are of equal lengths, that is |A| = |B|. He wants to get some lucky string from them. For this he performs the following operations. At first he arbitrary reorders digits of A. Then he arbitrary reorders digits of B. After that he creates the string C such that its i-th digit is the maximum between the i-th digit of A and the i-th digit of B. In other words, C[i] = max{A[i], B[i]} for i from 1 to |A|. After that he removes from C all non-lucky digits saving the order of the remaining (lucky) digits. So C now becomes a lucky string. For example, if after reordering A = "754" and B = "873", then C is at first "874" and then it becomes "74".

The Little Elephant wants the resulting string to be as lucky as possible. The formal definition of this is that the resulting string should be the lexicographically greatest possible string among all the strings that can be obtained from the given strings A and B by the described process.
Notes
- |A| denotes the length of the string A.
- A[i] denotes the i-th digit of the string A. Here we numerate the digits starting from 1. So 1 ≤ i ≤ |A|.
- The string A is called lexicographically greater than the string B if either there exists some index i such that A[i] > B[i] and for each j < i we have A[j] = B[j], or B is a proper prefix of A, that is, |A| > |B| and first |B| digits of A coincide with the corresponding digits of B.

-----Input-----

The first line of the input contains a single integer T, the number of test cases. T test cases follow. Each test case consists of two lines. The first line contains the string A. The second line contains the string B.

-----Output-----

For each test case output a single line containing the answer for the corresponding test case. Note, that the answer can be an empty string. In this case you should print an empty line for the corresponding test case.

-----Constraints-----
1 ≤ T ≤ 10000
1 ≤ |A| ≤ 20000

|A| = |B|

Each character of A and B is a digit.

Sum of |A| across all the tests in the input does not exceed 200000.

-----Example-----
Input:
4
4
7
435
479
7
8
1675475
9756417

Output:
7
74

777744

-----Explanation-----
Case 1. In this case the only possible string C we can get is "7" and it is the lucky string.

Case 2. If we reorder A and B as A = "543" and B = "749" the string C will be at first "749" and then becomes "74". It can be shown that this is the lexicographically greatest string for the given A and B.

Case 3. In this case the only possible string C we can get is "8" and it becomes and empty string after removing of non-lucky digits.

Case 4. If we reorder A and B as A = "7765541" and B = "5697714" the string C will be at first "7797744" and then becomes "777744". Note that we can construct any lexicographically greater string for the given A and B since we have only four "sevens" and two "fours" among digits of both strings A and B as well the constructed string "777744".

```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 lucky10(X, Y):\n\tx, y = {4:0, 7:0}, {4:0, 7:0}\n\tX =list(map(int, X))\n\tY =list(map(int,Y))\n\tx47, y47 = {4:0, 7:0}, {4:0, 7:0}\n\tfor i in X:\n\t\tif i == 4:\n\t\t\tx47[4] += 1\n\t\telif i == 7:\n\t\t\tx47[7] += 1\n\t\telif i < 4:\n\t\t\tx[4] += 1\n\t\telif i<7 and i>4:\n\t\t\tx[7] += 1\n\tfor i in Y:\n\t\tif i == 4:\n\t\t\ty47[4] += 1\n\t\telif i == 7:\n\t\t\ty47[7] += 1\n\t\telif i < 4:\n\t\t\ty[4] += 1\n\t\telif i<7 and i>4:\n\t\t\ty[7] += 1\n\t#print x47, y47, x, y\n\tn=""\n\tif x47[7] <= y[7]:\n\t\tn += \'7\'*x47[7]\n\t\ty[7] -= x47[7]\n\t\tx47[7] = 0\n\telif x47[7] <= (y[7]+y[4]):\n\t\tn     += \'7\'*x47[7]\n\t\ty[4]  -= (x47[7]-y[7])\n\t\ty[7]   = 0\n\t\tx47[7] = 0\n\telif x47[7] <= (y[7]+y[4]+y47[4]):\n\t\ty47[4] -= (x47[7]-(y[7]+y[4]))\n\t\tn += \'7\'*x47[7]\n\t\tx47[7] = 0\n\t\ty[7]=y[4]=0\n\telif x47[7] <= (y[7]+y[4]+y47[4] + y47[7]):\n\t\t\'\'\'print "Debug value:", (x47[7]-(y[7]+y[4]+y47[4]))\n\t\tprint y[7], " ", y[4], " ", y47[4]\n\t\tprint y47[7]\'\'\'\n\t\ty47[7] -= (x47[7]-(y[7]+y[4]+y47[4]))\n\t\tn += \'7\'*x47[7]\n\t\tx47[7] = 0\n\t\ty[7]=y[4]=y47[4]=0\n\t\t#print "7 left in y", y47[7]\n\telse:\n\t\tn += \'7\'*(y[7]+y[4]+y47[4]+y47[7])\t\t\n\t\tx47[7] = x47[7] - (y[7]+y[4]+y47[4]+y47[7])\n\t\ty[7]=y[4]=y47[4]=y47[7]=0\n\n\tif y47[7] <= x[7]:\n\t\tn += \'7\'*y47[7]\n\t\tx[7] -= y47[7]\n\t\ty47[7] = 0\n\telif y47[7] <= (x[7]+x[4]):\n\t\tn += \'7\'*y47[7]\n\t\tx[4] -= (y47[7]-x[7])\n\t\tx[7]  =0\n\t\ty47[7] = 0\n\telif y47[7] <= (x[7]+x[4]+x47[4]):\t\t\n\t\tx47[4] -= (y47[7]-(x[7]+x[4]))\n\t\tn += \'7\'*y47[7]\n\t\ty47[7] = 0\n\t\tx[7]=x[4]=0\n\telif y47[7] <= (x[7]+x[4]+x47[4] + x47[7]):\t\t\n\t\tx47[7] -= (y47[7]-(x[7]+x[4]+x47[4]))\n\t\tn += \'7\'*y47[7]\n\t\ty47[7] = 0\n\t\tx[7]=x[4]=x47[4]=0\n\telse:\n\t\tn += \'7\'*(x[7]+x[4]+x47[4]+x47[7])\t\t\n\t\ty47[7] -=  (x[7]+x[4]+x47[4]+x47[7])\n\t\tx[7]=x[4]=x47[4]=x47[7]=0\n\n\t\t####################4###############\n\tif x47[4] <= y[4]:\n\t\tn += \'4\'*x47[4]\n\t\ty[4] -= x47[4]\n\t\tx47[4] =0\n\telif x47[4] <= (y[4]+y47[4]):\n\t\tn += \'4\'*x47[4]\n\t\ty47[4] -= (x47[4]-y[4])\n\t\ty[4]   = 0\n\t\tx47[4] = 0\n\telse:\n\t\tn += \'4\'*(y47[4]+y[4])\t\t\n\t\tx47[4] -= (y47[4]+y[4])\n\t\ty47[4]=y[4]=0\n\n\tif y47[4] <= x[4]:\n\t\tn += \'4\'*y47[4]\n\t\tx[4] -= y47[4]\n\t\ty47[4] = 0\n\telif y47[4] <= (x[4]+x47[4]):\n\t\tn += \'4\'*y47[4]\n\t\tx47[4] -= (y47[4]-x[4])\n\t\tx[4]   = 0\n\t\ty47[4] = 0\n\telse:\n\t\tn += \'4\'*(x47[4]+x[4])\t\n\t\ty47[4] -= (x47[4]+x[4])\n\t\tx47[4]=x[4]=0\n\treturn n\ndef io():\n\tt = int(input())\n\tst = ""\n\twhile t>0:\n\t\ta = input()\n\t\tb = input()\n\t\tst += lucky10(a, b) + "\\n"\n\t\tt-=1\n\tprint(st)\nio()\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13463