bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

import java.io.*;
import java.util.*;
import java.lang.*;
    public class templ {
    public static int isGreater(int b[])
    {
        for(int i=25;i>=0;i--)
        {
            if(b[i]!=0)
                return(i);
        }
        return(0);
    }
    public static int isSmaller(int a[])
    {
        for(int i=0;i<=25;i++)
        {
            if(a[i]!=0)
                return(i);
        }
        return(25);
    }
    public static void main(String[] args) throws FileNotFoundException {
     try
     {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        templ ob=new templ();
        String s1=in.nextLine();
        String s2=in.nextLine();
        int l=s1.length();
        int a[]=new int[26];
        int b[]=new int[26];
        for(int i=0;i<26;i++)
        {
            a[i]=0;
            b[i]=0;
        }
        for(int i=0;i<l;i++)
        {
            char c=s1.charAt(i);
            int k=(int)c-(int)'a';
            a[k]++;
        }
        for(int i=0;i<l;i++)
        {
            char c=s2.charAt(i);
            int k=(int)c-(int)'a';
            b[k]++;
        }
        int t=0;
        int o,p;
        if(l%2==0)
        {
            o=l/2;
            p=l/2;
        }
        else
        {
            o=l/2+1;
            p=l/2;
        }
        for(int i=0;i<=25;i++)
        {
            t+=a[i];
            if(t>=o&&t!=25)
            {
                if(t>o)
                a[i]=t-o;
                for(int j=i+1;j<=25;j++)
                {
                    a[j]=0;
                }
                break;
            }
        }
        t=0;
        for(int i=25;i>=0;i--)
        {
            t+=b[i];
            if(t>=p&&t!=0)
            {
                if(t>p)
                b[i]=t-p;
                for(int j=i-1;j>=0;j--)
                {
                    b[j]=0;
                }
                break;
            }
        }
        char c[]=new char[l];
        int start=0,last=l-1;
        int K=0;
        for(int j=1;j<=l;j++)
        {
            int x=isSmaller(a);
            int y=isGreater(b);
            if(j%2==1)
            {
                if(x>y&&K==0)
                {
                    int k=isGreater(a);
                    a[k]--;
                    c[last]=(char)(k+97);
                    last-=1;
                }
                else
                {
                    int k=isSmaller(a);
                    a[k]--;
                    c[start]=(char)(k+97);
                    start+=1;
                    K=1;
                }
            }
            else
            {
                if(x>y&&K==0)
                {
                    int k=isSmaller(b);
                    b[k]--;
                    c[last]=(char)(k+97);
                    last-=1;
                }
                else
                {
                    int k=isGreater(b);
                    b[k]--;
                    c[start]=(char)(k+97);
                    start+=1;
                    K=1;
                }
            }
        }
        for(int i=0;i<l;i++)
        {
            out.print(c[i]);
        }
        out.println();
        out.close();
    }
        catch(Exception e){
        return;
    }
    }
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }
} 	