while 1 do a,b=io.read("*n","*n")c=a%10 io.write(c==a%100//10 and c or b//100)end