#include #include #include #include #include #include #include using namespace std; bool check(string from, int cnt, string to){ const int move[3][3][3] = {{{1,0,2},{0,2,1},{0,0,0}}, {{0,1,2},{1,2,0},{2,0,1}}, {{0,2,1},{1,0,2},{2,1,0}}}; const int youso[3] = {2,3,3}; string test = "aaa"; int use; if(cnt == 0){ return from == to; }else{ if(cnt == 1){ use = 0; }else if(cnt % 2 == 0){ use = 1; }else{ use = 2; } for(int i=0; i> from >> cnt >> to; if(check(from, cnt, to)){ cout << "FAILURE" << endl; }else{ cout << "SUCCESS" << endl; } return 0; }