#include<bits/stdc++.h>
using namespace std;
string a,b,c;
int br,br2;
int main(){
    cin>>a>>b;
    if(a.size()>b.size()){
            swap(a,b);
    }
    while(a.size()<b.size()){
        a.insert(0,1,'0');
        br2++;
    }
    br=a.size();
    for(int i=0;i<br;i++){
        if(a[i]>b[i])
            c.push_back(a[i]);
        else if(b[i]>a[i])
            c.push_back(b[i]);
        else if(a[i]==b[i] and i>=br2){
                c.push_back(a[i]);
                c.push_back(a[i]);
        }
        else
            c.push_back(a[i]);
    }
    cout<<c<<endl;



    }