using System; using System.Collections; namespace No_332 { class MainClass { private struct Progression { public long value; public int number; } private static int n; private static long x; private static Progression[] S; private static ArrayList result = new ArrayList(); public static void Main (string[] args) { ArrayList sumPos = new ArrayList(); string[] data = Console.ReadLine().Split(' '); int.TryParse(data[0], out n); long.TryParse(data[1], out x); string[] output = new string[n]; data = Console.ReadLine().Split(' '); S = new Progression[data.Length]; for (int i = 0; i < data.Length; i++) { long.TryParse(data[i], out S[i].value); S[i].number = i; } long[] value = new long[S.Length]; for (int i = 0; i < value.Length; i++) value[i] = S[i].value; Array.Sort(value, S); for (int i = S.Length - 1; S[i].value > x; i--) n = i; bool success = false; long sum = 0; for (int i = 0; i < n; i++) sum += S[i].value; if (sum >= x) { for (int i = 0; i < output.Length; i++) output[i] = "x"; for (int i = 0; i < n; i++) { if (TotalCheck(i, 0, sumPos)) { for (int j = 0; j < result.Count; j++) output[(int)result[j]] = "o"; for (int j = 0; j < output.Length; j++) Console.Write(output[j]); Console.WriteLine(); success = true; break; } } } if (!success) Console.WriteLine("No"); } private static bool TotalCheck(int pos, long sum, ArrayList sumPos) { sum += S[pos].value; if (sum == x) { sumPos.Add(S[pos].number); result = new ArrayList(sumPos); return true; } else if (sum < x) { for (int i = pos + 1; i < n; i++) { sumPos.Add(S[pos].number); if (TotalCheck(i, sum, sumPos)) return true; sumPos.RemoveAt(sumPos.Count - 1); } } return false; } } }