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