import java.util.*;


public class Main{
    public static void main(String[] arg){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNextLine()){
            String[] strs = sc.nextLine().split(" ");
//             System.out.println(strs[0].length());
//             System.out.println(strs[1].length());
            String tol = strs[0]+strs[1];

            StringBuffer s1 = new StringBuffer();
            StringBuffer s2 = new StringBuffer();
            for(int i=0;i<tol.length();i=i+2){
                s1.append(tol.charAt(i));
            }
            for(int i=1;i<tol.length();i=i+2){
                s2.append(tol.charAt(i));
            }
            char[] c1 = s1.toString().toCharArray();
            char[] c2 = s2.toString().toCharArray();
            Arrays.sort(c1);
            Arrays.sort(c2);
            StringBuffer buffer = new StringBuffer();

            for(int i=0;i<c1.length&&i<c2.length;i++){
                buffer.append(c1[i]);
                buffer.append(c2[i]);
            }
            if(c1.length>c2.length){
                buffer.append(c1[c1.length-1]);
            }

            for(int i=0;i<buffer.length();i++){
//                 System.out.println((int)buffer.charAt(i));
                if('0'<=buffer.charAt(i)&&buffer.charAt(i)<='9'){
                    //补齐四位
                    String leftZ = Integer.toBinaryString((int)(buffer.charAt(i)-'0'));
                    while(leftZ.length()<4){
                        leftZ = "0"+leftZ;
                    }
//                     System.out.println(leftZ);
                    myRev(leftZ);
                }else if(('A'<=buffer.charAt(i)&&buffer.charAt(i)<='F')||('a'<=buffer.charAt(i)&&buffer.charAt(i)<='f')){
//                     System.out.println(Integer.toBinaryString(Integer.parseInt(buffer.charAt(i)+"",16)));
                    myRev(Integer.toBinaryString(Integer.parseInt(buffer.charAt(i)+"",16)));
                }else{
                    System.out.print(buffer.charAt(i));
                }
            }
            System.out.println();
        }
    }
     public static void myRev(String str){
         StringBuffer buffer = new StringBuffer();
         for(int i =str.length()-1;i>=0;i--){
             buffer.append(str.charAt(i));
         }
         String res = Integer.toHexString(Integer.parseInt(buffer.toString(),2));
         if(Integer.parseInt(res,16)>9){
             System.out.print((char)(res.charAt(0)-32));
         }else{
             System.out.print(Integer.toHexString(Integer.parseInt(buffer.toString(),2)));
         }

     }
}