#include <bits/stdc++.h>
#include <cstring>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
bool and1 = a&b;
bool or1 = a|b;
bool xor1 = a^b;
if(and1==1 && c == 1) {
cout<<"AND"<<endl;
}
else if(and1 == 0 && c == 0){
cout<<"AND"<<endl;
}
if(or1==1 && c == 1) {
cout<<"OR"<<endl;
}
else if(or1 == 0 && c == 0){
cout<<"OR"<<endl;
}
if(xor1==1 && c==1) {
cout<<"XOR"<<endl;
}
else if(xor1 == 0 && c == 0){
cout<<"XOR"<<endl;
}
if(((and1==1 && c == 0)&&(and1 == 0 && c == 1))&&
((or1==1 && c == 0)&&(or1 == 0 && c == 1))&&
((xor1==1 && c==0)&&(xor1 == 0 && c == 1))){
cout<<"IMPOSSIBLE"<<endl;
}
}