#include #include int main(void) { char s[2][4]; int n,t[2]={0},f=0,i,j; scanf("%s%d%s",s[0],&n,s[1]); for(i=0;i<2;++i)for(j=0;j<3;++j)if(s[i][j]=='o')++t[i]; if(t[0]-t[1])f=1; else if(2>n&&(strcmp(s[0],"oxx")==0&&strcmp(s[1],"xxo")==0||strcmp(s[0],"xxo")==0&&strcmp(s[1],"oxx")==0))f=1; else if(1>n&&strcmp(s[0],s[1]))f=1; puts(f?"SUCCESS":"FAILURE"); return 0; }