FanXiang.java
import java.util.Scanner;
public class FanXiang {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
if(a>99&&a<1000) {
int b,c,d;
b=a%10;
c=a/10%10;
d=a/100;
System.out.println(b*100+c*10+d);
}
else System.out.println(-1);
}}