#include <iostream>

#include <cstdio>
#include <cstring>
#include <cmath>

using namespace std;

int main () {
    string a, b, c="000", d="000";
    int i;
    cin >> a >> b;
    for (i=0; i<3; i++) {
        c[i] = a[2-i];
        d[i] = b[2-i];
    }
    if (c.compare(d) > 0) cout << c;
       else cout << d;
    //system("pause");
    return 0;
}
