b,n,a=$<.read.split n=n.to_i ((b.count(?o)==a.count(?o))?n<1?b==a: n<2? 1 :1:p)?:SUCCESS:'FAILURE'