#include #include #include using namespace std; int main(void){ string b, a; int n; cin >> b >> n >> a; if (count(b.begin(), b.end(), 'o') != count(a.begin(), a.end(), 'o')){ cout << "SUCCESS" << endl; } else{ if (n >= 2){ cout << "FAILURE" << endl; return 0; } else if (n == 1){ string d, e, f; d = b[0], e = b[1], f = b[2]; if (a == d + e + f || a == e + d + f || a == d + f + e){ cout << "FAILURE" << endl; return 0; } } } cout << "SUCCESS" << endl; return 0; }