#include #include #include #include using namespace std; int main(){ string sb; string sa; int n; int cnta = 0; int cntb = 0; cin >>sb>> n>>sa; for (int i = 0; i < 3; i++){ if (sb[i] == 'o'){ cntb++; } if (sa[i] == 'o'){ cnta++; } } if (cntb != cnta){ cout << "SUCCESS" << endl; }else if (n >= 2){ cout << "FAILURE" << endl; } else if (n == 0){ if (sb == sa){ cout << "FAILURE" << endl; } else{ cout << "SUCCESS" << endl; } } else{ if (sb[1] == sa[1]&&sa!=sb){ cout << "SUCCESS" << endl; } else{ cout << "FAILURE" << endl; } } return 0; }