b,n,a=$<.read.split puts b.count(?o)!=a.count(?o)||n==?1&&!(a+b).squeeze[1]&&b.reverse==a ?:SUCCESS:'FAILURE'