import sys


def change_chr(chr):
    chr = '0x'+chr
    bnum = bin(int(chr,16))
    bnum = bnum[2:].zfill(4)
    bnum = bnum[::-1]
    xnum = hex(int('0b'+bnum,2))[2:].upper()
    return xnum

for line in sys.stdin:
    a = line.split()
    strthis = ''.join(a)

    odd = []
    even = []
    for i in range(len(strthis)):
        if i%2==1:
            odd.append(strthis[i])
        else:
            even.append(strthis[i])
    odd = sorted(odd)
    even = sorted(even)

    newstr = [odd.pop(0) if i%2==1 else even.pop(0) for i in range(len(strthis))]
    newstr = ''.join(newstr)

    outstr = []
    for i in newstr:
        if ord('0')<=ord(i)<=ord('9') or  ord('a')<=ord(i.lower())<=ord('f'):
            out = change_chr(i)
        else:
            out = i
        outstr.append(out)
    
    print(''.join(outstr).strip())