#include <bits/stdc++.h>
using namespace std;
int main(){

    int x, y;
    cin >> x >>y;
    int n =1;
    vector<int> v;
    for(int i = 0; i < 3; i++){
        if(x/n%10 > y/n%10){
            v.push_back(x/n%10);
        }
        else if(x/n%10 == y/n%10){
            v.push_back(x/n%10);
            v.push_back(y/n%10);
        }
        else{
            v.push_back(y/n%10);
        }
        n*=10;
    }
    for(int i = 0; i < v.size(); i++){
        cout << v.at(i);
    }
    return 0;
}