#include "bits/stdc++.h" #define REP(i,n,N) for(ll i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) (a)<=(n)&&(n)<(b) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<>s1>>n>>s2){ string ans="FAILURE"; int cnt = count(ALL(s1),'o'); if(cnt!=count(ALL(s2),'o')){ ans="SUCCESS"; }else{ if(n==0&&s1!=s2) { ans="SUCCESS"; } reverse(ALL(s2)); if(n==1&&(cnt==1||cnt==2)&&s1==s2){ ans="SUCCESS"; } } p(ans); } }