#include <iostream>
using namespace std;
int main() {
  int a,b;
  int n=1;
  int r=0;
  cin>>a>>b;
  while(a!=0 || b!=0){
    int a1=a%10;
    int b1=b%10;
    if(a1>b1){
      r=r+a1*n;
    }
    else if(a1<b1){
      r=r+b1*n;
    }
    else if(a1==b1){
      r=r+a1*n+b1*n*10;
      n=n*10;
    }
    a=a/10;
    b=b/10;
    n=n*10;
    }
    cout<<r;
}