Oleg the client and Igor the analyst are good friends. However, sometimes they argue over little things. Recently, they started a new company, but they are having trouble finding a name for the company.

To settle this problem, they've decided to play a game. The company name will consist of n letters. Oleg and Igor each have a set of n letters (which might contain multiple copies of the same letter, the sets can be different). Initially, the company name is denoted by n question marks. Oleg and Igor takes turns to play the game, Oleg moves first. In each turn, a player can choose one of the letters c in his set and replace any of the question marks with c. Then, a copy of the letter c is removed from his set. The game ends when all the question marks has been replaced by some letter.

For example, suppose Oleg has the set of letters {i, o, i} and Igor has the set of letters {i, m, o}. One possible game is as follows :

Initially, the company name is ???.

Oleg replaces the second question mark with 'i'. The company name becomes ?i?. The set of letters Oleg have now is {i, o}.

Igor replaces the third question mark with 'o'. The company name becomes ?io. The set of letters Igor have now is {i, m}.

Finally, Oleg replaces the first question mark with 'o'. The company name becomes oio. The set of letters Oleg have now is {i}.

In the end, the company name is oio.

Oleg wants the company name to be as lexicographically small as possible while Igor wants the company name to be as lexicographically large as possible. What will be the company name if Oleg and Igor always play optimally?

A string s = s_1s_2...s_{m} is called lexicographically smaller than a string t = t_1t_2...t_{m} (where s ≠ t) if s_{i} < t_{i} where i is the smallest index such that s_{i} ≠ t_{i}. (so s_{j} = t_{j} for all j < i)


-----Input-----

The first line of input contains a string s of length n (1 ≤ n ≤ 3·10^5). All characters of the string are lowercase English letters. This string denotes the set of letters Oleg has initially.

The second line of input contains a string t of length n. All characters of the string are lowercase English letters. This string denotes the set of letters Igor has initially.


-----Output-----

The output should contain a string of n lowercase English letters, denoting the company name if Oleg and Igor plays optimally.


-----Examples-----
Input
tinkoff
zscoder

Output
fzfsirk

Input
xxxxxx
xxxxxx

Output
xxxxxx

Input
ioi
imo

Output
ioi



-----Note-----

One way to play optimally in the first sample is as follows : Initially, the company name is ???????. Oleg replaces the first question mark with 'f'. The company name becomes f??????. Igor replaces the second question mark with 'z'. The company name becomes fz?????. Oleg replaces the third question mark with 'f'. The company name becomes fzf????. Igor replaces the fourth question mark with 's'. The company name becomes fzfs???. Oleg replaces the fifth question mark with 'i'. The company name becomes fzfsi??. Igor replaces the sixth question mark with 'r'. The company name becomes fzfsir?. Oleg replaces the seventh question mark with 'k'. The company name becomes fzfsirk.

For the second sample, no matter how they play, the company name will always be xxxxxx.

Difficulty: competition

Starter code:

Solutions:
oleg = input()
igor = input()
oleg = sorted(list(oleg))
igor = sorted(list(igor))
n = len(oleg)
oleg_turns = (n + 1) // 2
igor_turns = n // 2
min_oleg_id = 0
min_igor_id = n - igor_turns
ans = ['?'] * n
max_oleg_id = oleg_turns - 1 
max_igor_id = n - 1
curr_turn = 'o'
next_turn = {'o' : 'i', 'i' : 'o'}
l_ans = 0
r_ans = n - 1
while r_ans >= l_ans:
    if curr_turn == 'o':
        if oleg[min_oleg_id] < igor[max_igor_id]:
            ans[l_ans] = oleg[min_oleg_id]
            l_ans += 1
            min_oleg_id += 1
        else:
            ans[r_ans] = oleg[max_oleg_id]
            r_ans += -1
            max_oleg_id += -1
        curr_turn = 'i'
    else:
        if igor[max_igor_id] > oleg[min_oleg_id]:
            ans[l_ans] = igor[max_igor_id]
            l_ans += 1
            max_igor_id += -1
        else:
            ans[r_ans] = igor[min_igor_id]
            r_ans += -1
            min_igor_id += 1
        curr_turn = 'o'
strans = ''.join(ans)
print(strans)


import sys
from math import sqrt

def solve():
    s = input() # Oleg's letters
    t = input() # Igor's letters
    n = len(s)

    s = sorted(s)[:(n + 1) // 2]
    t = sorted(t, reverse=True)[:n // 2]

    '''
    print(s)
    print(t)
    '''

    ans = [None] * n
    ansl = 0
    ansr = n - 1

    olgl = 0
    olgr = len(s) - 1
    igol = 0
    igor = len(t) - 1

    for i in range(n):
        if i % 2 == 0:
            if igol > igor or s[olgl] < t[igol]:
                ans[ansl] = s[olgl]
                ansl += 1
                olgl += 1
            else:
                ans[ansr] = s[olgr]
                ansr -= 1
                olgr -= 1
            pass
        else:
            if olgl > olgr or t[igol] > s[olgl]:
                ans[ansl] = t[igol]
                ansl += 1
                igol += 1
            else:
                ans[ansr] = t[igor]
                ansr -= 1
                igor -= 1
            pass

        # print(ans)

    ans = ''.join(ans)

    print(ans)

def __starting_point():
    solve()
__starting_point()

s1 = input()
s2 = input()

n = len(s1)

s1 = sorted(s1)
s2 = sorted(s2)[::-1]

i = 0
j = 0

res = ["?"]*n
rear = n-1
front = 0

Neven = n % 2 == 0

n1 = (n+1)//2 - 1
n2 = n//2 - 1

for k in range(n):
    if k % 2 == 0:
        if s1[i] < s2[j]:
            res[front] = s1[i]
            front += 1
            i += 1
        else:
            res[rear] = s1[n1]
            rear -= 1
            n1 -= 1
    else:
        if s1[i] < s2[j]:
            res[front] = s2[j]
            front += 1
            j += 1
        else:
            res[rear] = s2[n2]
            rear -= 1
            n2 -= 1

print("".join(res))


import sys

def main():
    s=sys.stdin.readline().rstrip()
    t=sys.stdin.readline().rstrip()
    
    result=[]
    
    iisl=0
    iisr=len(s)//2+len(s)%2-1
    iitl=0
    iitr=len(s)//2-1
    
    aas=list(sorted(list(s)))
    aat=list(sorted(list(t),reverse=True))
    rl=0
    rr=len(s)-1
    result=['?']*len(s)
    
    for i in range(len(s)):
        if i%2==0:
            if aas[iisl]<aat[iitl]:
                result[rl]=aas[iisl]
                iisl+=1
                rl+=1
            else:
                result[rr]=aas[iisr]
                iisr-=1
                rr-=1
        else:
            if aat[iitl]>aas[iisl]:
                result[rl]=aat[iitl]
                iitl+=1
                rl+=1
            else:
                result[rr]=aat[iitr]
                iitr-=1
                rr-=1
    
    sys.stdout.write(''.join(result)+'\n')
    
main()



#!/usr/bin/env python3
from sys import stdin, stdout

def rint():
    return map(int, stdin.readline().split())
#lines = stdin.readlines()
a = list(input())
b = list(input())

a.sort( )
b.sort(reverse=True )
n = len(a)
ans = ['' for i in range(n)]
ai = 0
bi = 0
aj = 0
bj = 0
aiend = n//2 -1
if n%2:
    aiend += 1
biend = n//2 -1
i = 0
j = 0
flag = 0
while i + j < n:
    if i + j < n:
        if a[ai] < b[bi] and flag ==0:
            ans[i] = a[ai]
            i+=1
            ai+=1
        else:
            ans[n-j-1] = a[aiend-aj]
            j+=1
            aj+=1
            flag = 1
    if i + j < n:
        if a[ai] < b[bi] and flag ==0:
            ans[i] = b[bi]
            i+=1
            bi+=1
        else:
            ans[n-j-1] = b[biend-bj]
            j+=1
            bj+=1
            flag = 1
print("".join(ans))

a = list(input())
b = list(input())
n = len(a)
if len(a) == 1:
    print(a[0])
    return
a.sort()
b.sort()
a = a[:(len(a) + 1) // 2]
if n % 2 == 1:
    b = b[(len(b) // 2) + 1:]
else:
    b = b[(len(b) // 2):]
sa = 0
ea = len(a) - 1
sb = 0
eb = len(b) - 1
stb = 0
ste = n - 1
st = [""] * n

for i in range(n):
    if i % 2 == 0:
        if a[sa] < b[eb]:
            st[stb] = a[sa]
            sa += 1
            stb += 1
        else:
            st[ste] = a[ea]
            ea -= 1
            ste -= 1
    else:
        if eb == sb and n % 2 == 0:
            st[stb] = b[eb]
            break
        if b[eb] > a[sa]:
            st[stb] = b[eb]
            eb -= 1
            stb += 1
        else:
            st[ste] = b[sb]
            ste -= 1
            sb += 1
for i in range(len(st)):
    print(st[i], end="")

from collections import deque

a = sorted(input())
l = len(a)
a = deque(a[:(len(a)+1)//2])
b = sorted(input())
b = deque(b[len(b)-len(b)//2:])
# print(a, b)

result = ["0"] * l
left = -1
right = l

while left <= right:
    if len(b) == 0:
        result[left+1] = a[0]
        break
    if a[0] >= b[-1]:
        right -= 1
        result[right] = a[-1]
        a.pop()
    else:
        left += 1
        result[left] = a[0]
        a.popleft()
    # print(result)
    #print(left, right)
    if len(a) == 0:
        result[left+1] = b[0]
        break
    if a[0] >= b[-1]:
        right -= 1
        result[right] = b[0]
        b.popleft()
    else:
        left += 1
        result[left] = b[-1]
        b.pop()
    # print(result)
    # print(left, right)

print("".join(result))

import sys

def solve():
    s = input()
    t = input()

    n = len(s)
    s = sorted(s)[:(n + 1) // 2]
    t = sorted(t, reverse=True)[:n // 2]

    ans = [''] * n
    ansl = 0
    ansr = n - 1

    olgl = 0
    olgr = len(s) - 1
    igol = 0
    igor = len(t) - 1

    for i in range(n):
        if i % 2 == 0:
            if igol > igor or s[olgl] < t[igol]:
                ans[ansl] = s[olgl]
                ansl += 1
                olgl += 1
            else:
                ans[ansr] = s[olgr]
                ansr -= 1
                olgr -= 1
        else:
            if olgl > olgr or t[igol] > s[olgl]:
                ans[ansl] = t[igol]
                ansl += 1
                igol += 1
            else:
                ans[ansr] = t[igor]
                ansr -= 1
                igor -= 1

    print(''.join(ans))

def __starting_point():
    solve()
__starting_point()

s=input()#want small
t=input()#want large
n=len(s)
vs=[0]*26
vt=vs[:]

for i in range(n):
    vs[ord(s[i])-97]+=1
    vt[ord(t[i])-97]+=1
ns=n//2+n%2
nt=n//2
cur=0
starts=0
ends=0
for i in range(26):
    if cur+vs[i]<ns:
        cur+=vs[i]
    else:
        vs[i]=ns-cur
        cur=ns
        ends=i
        break
cur=0
startt=0
endt=25
for i in range(25,-1,-1):
    if cur+vt[i]<nt:
        cur+=vt[i]
    else:
        vt[i]=nt-cur
        cur=nt
        startt=i
        break
res=['*']*n
start=0
end=n-1
for i in range(n):
    while(starts<26 and vs[starts]==0): 
        starts+=1
    while(ends>=0 and vs[ends]==0): 
        ends-=1
    while(startt<26 and vt[startt]==0): 
        startt+=1
    while(endt>=0 and vt[endt]==0): 
        endt-=1
    while(res[start]!='*'):
        start+=1
    while res[end]!='*':
        end-=1
    if i%2==0:# s
        
        if starts>=endt:
            res[end]=chr(97+ends)
            vs[ends]-=1
        else:
            res[start]=chr(97+starts)
            vs[starts]-=1
    else:
        if endt<=starts:
            res[end]=chr(97+startt)
            vt[startt]-=1
        else:
            res[start]=chr(97+endt)
            vt[endt]-=1
            
for i in range(n):
    print(res[i],end='')            
        
    


s1 = input()
s2 = input()
n = len(s1)
s1 = sorted(s1)
s2 = sorted(s2)[::-1]
i = 0
j = 0
res = ["?"]*n
rear = n-1
front = 0
n1 = (n+1)//2 - 1
n2 = n//2 - 1

for k in range(n):
    if k & 1 == 0:
        if s1[i] < s2[j]:
            res[front] = s1[i]
            front += 1
            i += 1
        else:
            res[rear] = s1[n1]
            rear -= 1
            n1 -= 1
    else:
        if s1[i] < s2[j]:
            res[front] = s2[j]
            front += 1
            j += 1
        else:
            res[rear] = s2[n2]
            rear -= 1
            n2 -= 1

print("".join(res))

s1 = input()
s2 = input()
n = len(s1)
s1 = sorted(s1)
s2 = sorted(s2)[::-1]
i = 0
j = 0
res = ["?"]*n
rear = n-1
front = 0
n1 = (n+1)//2 - 1
n2 = n//2 - 1

for k in range(n):
    if k & 1 == 0:
        if s1[i] < s2[j]:
            res[front] = s1[i]
            front += 1
            i += 1
        else:
            res[rear] = s1[n1]
            rear -= 1
            n1 -= 1
    else:
        if s1[i] < s2[j]:
            res[front] = s2[j]
            front += 1
            j += 1
        else:
            res[rear] = s2[n2]
            rear -= 1
            n2 -= 1

print("".join(res))

a = list(input())
b = list(input())
a.sort()
b.sort(reverse=True)
ans = list()
for i in a:
    ans.append("a") 
len1 = len(a)//2 - 1
len2 = len(a)//2 - 1
if len(a)%2:
    len1 = len1 + 1
i = 0 # first
j = 0 # end
flag = 0
ai = 0
aj = 0
bi = 0
bj = 0
while i + j < len(a):
    if i + j < len(a):
        if a[ai] < b[bi] and flag == 0:
            ans[i] = a[ai]
            i = i + 1
            ai = ai + 1
        else:
            ans[len(a)-j-1] = a[len1 - aj]
            j = j + 1
            aj = aj + 1
            flag = 1
    if i + j < len(a):
        if a[ai] < b[bi] and flag == 0:
            ans[i] = b[bi]
            i = i + 1
            bi = bi + 1
        else:
            ans[len(a)-j-1] = b[len2 - bj]
            j = j + 1
            bj = bj + 1
            flag = 1
print("".join(ans))

str1 = list(input())
str2 = list(input())
str1.sort()
str2.sort(reverse=True)
n = len(str1)
str = ['?'] * n
i, j, ni, nj = 0, 0, (n + 1) // 2 - 1, n // 2 - 1
front, rear = 0, n - 1
for cur in range(n):
    if cur & 1 == 0:
        if (str1[i] < str2[j]):
            str[front] = str1[i]
            i += 1
            front += 1
        else:
            str[rear] = str1[ni]
            ni -= 1
            rear -= 1
    else:
        if (str1[i] < str2[j]):
            str[front] = str2[j]
            j += 1
            front += 1
        else:
            str[rear] = str2[nj]
            nj -= 1
            rear -= 1

print(''.join(str))


s1 = input()
s2 = input()

n = len(s1)

s1 = sorted(s1)
s2 = sorted(s2)[::-1]

i = 0
j = 0

res = ["?"]*n
rear = n-1
front = 0

Neven = n % 2 == 0

n1 = (n+1)//2 - 1
n2 = n//2 - 1

for k in range(n):
    if k % 2 == 0:
        if s1[i] < s2[j]:
            res[front] = s1[i]
            front += 1
            i += 1
        else:
            res[rear] = s1[n1]
            rear -= 1
            n1 -= 1
    else:
        if s1[i] < s2[j]:
            res[front] = s2[j]
            front += 1
            j += 1
        else:
            res[rear] = s2[n2]
            rear -= 1
            n2 -= 1

print("".join(res))

from collections import deque
oleg = sorted(list(input()))
n = len(oleg)
oleg = deque(oleg[:(n-(n//2))])
igor = deque(sorted(list(input()),reverse = True)[:(n//2)])

result = ["" for i in range(n)]
result_front = 0
result_rear = -1
o = True
while result_front-result_rear-1 < n:
    if o:
        if len(igor) == 0 or oleg[0] < igor[0]:
            result[result_front] = oleg.popleft()
            result_front+=1
        else:
            result[result_rear] = oleg.pop()
            result_rear-=1
    else:
        if len(oleg) == 0 or igor[0] > oleg[0]:
            result[result_front] = igor.popleft()
            result_front+=1
        else:
            result[result_rear] = igor.pop()
            result_rear-=1
    #print(result)
    o = not o
print("".join(result))

from collections import deque
oleg = sorted(list(input()))
n = len(oleg)
oleg = deque(oleg[:(n-(n//2))])
igor = deque(sorted(list(input()),reverse = True)[:(n//2)])

result = ["" for i in range(n)]
result_front = 0
result_rear = -1
igor_turn = True
while result_front-result_rear-1 < n:
    if igor_turn:
        if len(igor) == 0 or oleg[0] < igor[0]:
            result[result_front] = oleg.popleft()
            result_front+=1
        else:
            result[result_rear] = oleg.pop()
            result_rear-=1
    else:
        if len(oleg) == 0 or igor[0] > oleg[0]:
            result[result_front] = igor.popleft()
            result_front+=1
        else:
            result[result_rear] = igor.pop()
            result_rear-=1
    #print(result)
    igor_turn = not igor_turn
print("".join(result))

a = list(input())
b = list(input())
name = [None for _ in range(len(a))]

a.sort()
b.sort(reverse=True)


ai = 0
aj = (len(a)+1)//2 - 1
bi = 0
bj = len(b)//2 - 1

turn = 0   # 0 -> player A
ansi = 0
ansj = len(name)-1
#print(a, b, ai, aj, bi, bj)
for _ in range(len(name)):
    if not turn:

        if a[ai] < b[bi]:
            name[ansi] = a[ai]
            ai += 1
            ansi += 1

        else:
            name[ansj] = a[aj]
            aj -= 1
            ansj -= 1

    else:

        if b[bi] > a[ai]:
            name[ansi] = b[bi]
            bi += 1
            ansi += 1

        else:
            name[ansj] = b[bj]
            bj -= 1
            ansj -= 1

    turn ^= 1

print(''.join(name))


from sys import stdin, stdout
a = stdin.readline().rstrip()
b = stdin.readline().rstrip()
a_count = 26*[0]
b_count = 26*[0]
length = len(a)
for i in range(length):
    a_count[ord(a[i]) - ord('a')] += 1
    b_count[ord(b[i]) - ord('a')] += 1
result = length * ['a']
left = 0
right = length - 1
mina, minb, maxa, maxb = 0, 0, 25, 25
exclude = length//2
for i in range(25,-1,-1):
    if exclude <= 0:
        break
    while exclude >0 and a_count[i] !=0:
        exclude -= 1
        a_count[i] -= 1
exclude = (length + 1) // 2
for i in range(26):
    if exclude <= 0:
        break
    while exclude >0 and b_count[i] != 0:
        exclude -= 1
        b_count[i] -= 1
    
while a_count[mina] == 0 and mina < 25:
    mina += 1
while b_count[minb] == 0 and minb < 25:
    minb += 1
while a_count[maxa] == 0 and maxa > 0:
    maxa -= 1
while b_count[maxb] == 0 and maxb > 0:
    maxb -= 1
i = 0
while i < length:
    if i & 1 == 0:  # Alice 
        if mina < maxb:
            result[left] = chr(ord('a')+mina)
            left += 1
            a_count[mina] -= 1
            while a_count[mina] == 0 and mina < 25:
                mina += 1     
        else:
            result[right] = chr(ord('a') + maxa)
            right -= 1
            a_count[maxa] -= 1
            while a_count[maxa] == 0 and maxa > 0:
                maxa -= 1
    else:
        if mina < maxb:
            result[left] = chr(ord('a')+maxb)   
            left += 1
            b_count[maxb] -= 1
            while b_count[maxb] == 0 and maxb > 0:
                maxb -= 1
        else:
            result[right] = chr(ord('a') + minb)
            right -= 1
            b_count[minb] -= 1
            while b_count[minb] == 0 and minb < 25:
                minb += 1            
    i += 1
print(''.join(result))


s1 = list(input())
s2 = list(input())
s1.sort()
s2.sort(reverse=True)
n = len(s1)
s = ['?'] * n
i, j, ni, nj = 0, 0, (n + 1) // 2 - 1, n // 2 - 1
front, rear = 0, n - 1
for cur in range(n):
    if cur & 1 == 0:
        if (s1[i] < s2[j]):
            s[front] = s1[i]
            i += 1
            front += 1
        else:
            s[rear] = s1[ni]
            ni -= 1
            rear -= 1
    else:
        if (s1[i] < s2[j]):
            s[front] = s2[j]
            j += 1
            front += 1
        else:
            s[rear] = s2[nj]
            nj -= 1
            rear -= 1

print(''.join(s))

s=input()
s1=input()
n=len(s1)
sl=[]
sl1=[]
for i in range(n):
    sl+=[s[i]]
    sl1+=[s1[i]]
ans=sl1[::]
sl1.sort()
sl.sort()
sl1.reverse()
i=0;    
i2=(n-1)//2
k=0
k2=(n//2)-1
j=len(s)-1
temp=0
for x in range(len(s1)):
    if (x%2==0):
        if (sl[i]<sl1[k]) :     
            ans[temp]=sl[i]
            temp+=1
            i+=1
        elif (sl[i]>=sl1[k]) :  
            ans[j]=sl[i2]
            i2-=1
            j-=1
    if (x%2==1) : 
        if (sl[i]<sl1[k]) :
            ans[temp]=sl1[k]
            temp+=1
            k+=1
        elif (sl[i]>=sl1[k]) :   
            ans[j]=sl1[k2]
            j-=1
            k2-=1
print(''.join(ans))

a = sorted(input())
b = sorted(input(), reverse=True)
n = len(a)
a = ''.join(a[:(n+1)//2])
b = ''.join(b[:n//2])
name = ['']*(len(a)+len(b))

ia = ib = ic = 0
ja = len(a)-1
jb = len(b)-1
jc = len(name)-1
turn = 1
while ic <= jc:
    if turn == 1:
        if ib > jb: name[ic] = a[ia]; ic+= 1
        elif a[ia] < b[ib]: name[ic] = a[ia]; ia+= 1; ic+= 1
        else: name[jc] = a[ja]; ja-= 1; jc-= 1
    else:
        if ia > ja: name[ic] = b[ib]; ic+= 1
        elif b[ib] > a[ia]: name[ic] = b[ib]; ib+= 1; ic+= 1
        else: name[jc] = b[jb]; jb-= 1; jc-= 1
    turn = 3-turn
print(''.join(name))