::x::a,b,c=io.read("*n",2,3)print(a%100%11==0 and a%10 or b)goto x