#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; int64_t X; cin >> N >> X; vector> P(N); for (int i = 0; i < N; i++) { int64_t a; cin >> a; P[i] = make_pair(a, i); } sort(P.begin(), P.end()); int64_t sum = 0, bound = 200000; vector dp(bound * 2, -1); dp[0] = 0; int base = 0; for (int i = 0; i < N; i++) { if (sum + P[i].first > bound) { base = i; break; } for (int j = sum; j > -1; j--) { if (dp[j] >= 0 && dp[j + P[i].first] == -1) { dp[j + P[i].first] = i; } } sum += P[i].first; } if (sum + P.back().first <= bound) base++; vector res(N, 'x'); for (int b = 0; b < (1 << (N - base)); b++) { int64_t t = 0; for (int i = 0; i < N - base; i++) { if ((b >> i) & 1) t += P[i + base].first; } if (X - t < 0 || X - t > bound) continue; if (dp[X - t] >= 0) { for (int i = 0; i < N - base; i++) { if ((b >> i) & 1) { res[P[i + base].second] = 'o'; } } int64_t x = X - t; while (x > 0) { res[dp[x]] = 'o'; x -= P[dp[x]].first; } for (auto &v : res) { cout << v; } cout << '\n'; return 0; } } cout << "No" << '\n'; return 0; }