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