#include "bits/stdc++.h"
#define ll long long
#define pb push_back
using namespace std;


void solve() {
    int n,m,p1,p2;
    string s="";
    cin>>n>>m;
    while(n!=0||m!=0){
        p1=n%10;
        p2=m%10;
        if(n==0)s+='0'+p2;
        else if(m==0)s+='0'+p1;
        else if(p1==p2){
            s+='0'+p1;
            s+='0'+p2;
        }
        else if(p1<p2)s+='0'+p2;
        else if(p1>p2)s+='0'+p1;
        n/=10;
        m/=10;
    }
    for(int i=s.length()-1;i>=0;i--){
        cout<<s[i];
    }           
}

int main () {
    int t=1;
    /*
    cin>>t;
    //*/
    while(t--) {
        solve();
    }
}