#include <bits/stdc++.h>
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#define N 10000005
using namespace std;
int a[20],b[20];
int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    unsigned long long int x,y,k=0,l=0;
    cin>>x>>y;

    while(y>0){
        b[l]=y%10;
        y=y/10;
        l++;
    }
    while(x>0){
        a[k]=x%10;
        x=x/10;
        k++;
    }
    int n=max(k,l);
    int n2=min(k,l);

    int c[20],c1=0;
    for(int i=0;i<n;i++){

        if(a[i]==0 and b[i]==0 and i>=n2){
            c[c1]=0;
            c1++;
            }

            else {
                if(a[i]>b[i]){
                c[c1]=a[i];
                c1++;
            }
            else if(b[i]>a[i]){
                c[c1]=b[i];
                c1++;
            }
            else{
                c[c1]=b[i];
                c1++;
                c[c1]=a[i];
                c1++;
            }
        }
    }
    for(int i=c1-1;i>=0;i--)cout<<c[i];

    return 0;
}