#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if (a==0 and b==0){
if (c==0) {
cout <<"AND"<<endl<<"OR"<<endl<<"XOR"<<endl;
} else cout <<"IMPOSSIBLE"<<endl;
}
if (a==0 and b!=0){
if (c==0){
cout <<"AND"<<endl;
}
if (c==1){
cout <<"OR"<<endl<<"XOR"<<endl;
}
}
if (a!=0 and b==0){
if (c==0){
cout <<"AND"<<endl;
}
if (c==1){
cout <<"OR"<<endl<<"XOR"<<endl;
}
}
if (a!=0 and b!=0){
if (c==1){
cout <<"AND"<<endl<<"OR"<<endl;
}
if (c==0){
cout <<"XOR"<<endl;
}
}
cout <<endl;
return 0;
}