while(0<1)println{val a=readLine split' ' 2 to 10 find(BigInt(a(0)).toString(_)==a(1))get}