using System; public class Hello { public static void Main() { var s = Console.ReadLine().Trim(); var n = int.Parse(Console.ReadLine().Trim()); var t = Console.ReadLine().Trim(); Console.WriteLine(check(s, t, n) ? "SUCCESS" : "FAILURE"); } public static bool check(string s, string t, int n) { var sx = 3 - s.Replace("x", "").Length; var tx = 3 - t.Replace("x", "").Length; if (sx != tx) return true; if (n == 0 && s != t) return true; if (n >= 2) return false; if (n == 1) { var ns1 = s[1] + s[0] + s[2] + ""; var ns2 = s[0] + s[2] + s[1] + ""; if (ns1 == t | ns2 == t) return false; else return true; } return false; } }