a,b,c=map(int,input().split()) if a==0 and b==0: if c==0: print("AND\n""OR\n""XOR") else: print("IMPOSSIBLE") elif a!=0 and b==0: if c==0: print("AND") else: print("OR\n""XOR") elif a==0 and b!=0: if c==0: print("AND") else: print("OR\n""XOR") else: if c==0: print("XOR") else: print("AND\n""OR")