#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)< pii; typedef vector vi; typedef vector vll; template void psort(vector &u, vector &v, bool isGreater=false){ int n = (int)u.size(); vector> vecP(n); for(int i = 0; i < n; ++i){ vecP[i].first = u[i]; vecP[i].second = v[i]; } if(isGreater){ sort(vecP.rbegin(), vecP.rend()); } else{ sort(vecP.begin(), vecP.end()); } for(int i = 0; i < n; ++i){ u[i] = vecP[i].first; v[i] = vecP[i].second; } } const int R = 100001; int N, dp[101][R]; ll X; vi idA; const string NO = "No"; vi makeAns(ll x, int last){ int cur = last; vi res; while(x && cur){ if(dp[cur][x] != dp[cur-1][x]){ res.push_back(cur - 1); x = dp[cur][x]; } cur--; } sort(all(res)); return res; } void print(vi ans){ string res(N, 'x'); each(a, ans)res[idA[a]] = 'o'; cout << res << endl; } int main(){ ios::sync_with_stdio(0); cin.tie(0); cin >> N >> X; vll A(N); idA.resize(N); iota(all(idA), 0); rep(i, N)cin >> A[i]; psort(A, idA); int cur = 0; ll tot = 0; MEM(dp, -1); dp[0][0] = 0; for(; cur < N; ++cur){ tot += A[cur]; if(tot >= R)break; rep(i, R)if(dp[cur][i] != -1) dp[cur + 1][i + A[cur]] = i; rep(i, R)if(dp[cur][i] != -1)dp[cur + 1][i] = dp[cur][i]; } if(cur == N){ if(X >= R || dp[N][X] == -1) cout << NO << endl; else print(makeAns(X, cur)); return 0; } int M = N - cur, off = cur; rep(S, 1 << M){ ll sum = 0; rep(i, M)if(S >> i & 1) sum += A[off + i]; if(sum > X || X - sum >= R)continue; if(dp[cur][X-sum] != -1){ vi ans = makeAns(X-sum, cur); rep(i, M)if(S >> i & 1)ans.push_back(off + i); print(ans); return 0; } } cout << NO << endl; }