# TLEになるけど、前回の提出物があまりにも間違っていたので修正 N, X = gets.split.map(&:to_i) A = gets.split.map(&:to_i) L = A.length S = A.inject(&:+) def check(a, i, x, s) throw :ok, a + "x" * (L-a.length) if x == 0 return if x < 0 return if s < x return if i >= L check(a + "o", i + 1, x - A[i], s - A[i]) check(a + "x", i + 1, x, s - A[i]) end ans = catch(:ok) do check("", 0, X, S) end puts ans || "No"