a[],s,i,t;main(k){for(;k=~getchar();k+11?a[i]=a[i]*2-k%2,t+=i^k&1:scanf("%d\n",&s,i++));i=!puts(t-3|(s?s-1?0:(*a*=a[1])==4|*a==18|*a==25:*a-a[1])?"SUCCESS":"FAILURE");}