#include #include #define SUCCESS std::cout << "SUCCESS\n" #define FAILURE std::cout << "FAILURE\n" int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); int n; std::string before, after; std::cin >> before >> n >> after; int coinNum = 0; for(int i=0; i<3; ++i){ if(before[i]=='o') ++coinNum; if( after[i]=='o') --coinNum; } if(coinNum!=0) SUCCESS; else{ switch(n){ case 0: (before!=after) ? SUCCESS : FAILURE; break; case 1: (before!=after) ? ((before[1]==after[1]) ? SUCCESS : FAILURE) : SUCCESS; break; default: FAILURE; } } }