#include #include using namespace std; int main(){ string a,b;int n;cin>>a>>n>>b; int z = 0; for(int i = 0; 3 > i; i++)z+=a[i]=='o'; for(int i = 0; 3 > i; i++)z-=b[i]=='o'; if(z){ cout << "SUCCESS" << endl; return 0; }else{ if(n==1){ reverse(b.begin(),b.end()); if(a==b && a!="ooo" && a!="xxx"){ cout << "SUCCESS" << endl; return 0; } } } cout << "FAILURE" << endl; }