import java.util.Scanner;
public class problem9 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
// 백의 자리 십의 자리 일의 자리
a = ((a % 10)*100) + ((a %100)/10) * 10 + (a / 100);
b = ((b % 10)*100) + ((b %100)/10) * 10 + (b / 100);
if(a > b){
System.out.println(a);
}else{
System.out.println(b);
}
}
}