for i = 0, 31, 1 do a,b=io.read("*n","*n") if a%10==(a%100-a%10)/10 then io.write (a%10) else io.write (b%100-b%10)/100 end end