#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; int64_t X; cin >> N >> X; vector> A(N); for (int i = 0; i < N; i++) { int64_t a; cin >> a; A[i] = make_pair(a, i); } sort(A.begin(), A.end()); vector dp(3000000, -1); dp[0] = 0; int pos = 0; int64_t sum = 0; for (int i = 0; i < N; i++) { if (sum + A[i].first > 2000000) { pos = i; break; } for (int j = 2000000; j > -1; j--) { if ((j == 0 || dp[j] != -1) && dp[j + A[i].first] == -1) { dp[j + A[i].first] = A[i].second; } } sum += A[i].first; pos = i + 1; } for (int bit = 0; bit < (1 << (N - pos + 1)); bit++) { sum = 0; for (int i = 0; i < N - pos; i++) { if ((bit >> i) & 1) { sum += A[i + pos].first; } } sum = X - sum; if (sum == 0 || (sum < 3000000 && dp[sum] != -1)) { vector res(N, 'x'); for (int i = 0; i < N - pos; i++) { if ((bit >> i) & 1) { res[A[i + pos].second] = 'o'; } } while (sum != 0) { cout << dp[sum] << '\n'; res[A[dp[sum]].second] = 'o'; sum -= A[dp[sum]].first; } for (int i = 0; i < N; i++) { cout << res[i]; } cout << '\n'; return 0; } } cout << "No" << '\n'; return 0; }