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