#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int x,y;
    static int broj[20];
    int n=0;
    int xi,yi;
    cin>>x>>y;
while(x>0||y>0)
{
    xi=x%10;
    yi=y%10;
    if(xi>yi)broj[n]=xi;
    else if(xi<yi)broj[n]=yi;
    else
    {
        if(x!=0&&y!=0){broj[n]=xi;n++;broj[n]=xi; }
        else broj[n]=xi+yi;

    }
 n++;
 x=x/10;
 y=y/10;
}
l:
for(int i=n-1;i>=0;i--)
    cout<<broj[i];
    return 0;
}