#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for((i)=0;(i)<(int)(n);(i)++) #define snuke(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++) typedef long long ll; int N,K; int a[110]; vector > v; // a[i], id bitset <800010> dp[90]; bool found = false; bool ans[110]; bool ans2[110]; void check(ll X){ int i; if(X < 0 || X >= 8000010 || found) return; dp[0].reset(); dp[0][0] = true; REP(i,N-K) dp[i+1] = ((dp[i] << a[v[i].second]) | dp[i]); if(!dp[N-K][X]) return; found = true; for(i=N-K-1;i>=0;i--){ int id = v[i].second; if(a[id] <= X && dp[i][X-a[id]]){ ans[id] = true; X -= a[id]; } else { ans[id] = false; } } REP(i,N) ans2[i] = ans[i]; } void dfs(int pos, ll X){ if(pos == N-K){ check(X); return; } int id = v[pos-1].second; ans[id] = false; dfs(pos-1, X); ans[id] = true; dfs(pos-1, X-a[id]); } int main(void){ int i; ll X; cin >> N >> X; REP(i,N) cin >> a[i]; REP(i,N) v.push_back(make_pair(a[i], i)); sort(v.begin(),v.end()); K = min(N, 20); dfs(N, X); if(!found){ cout << "No" << endl; } else { string s; REP(i,N) s += (ans2[i] ? 'o' : 'x'); cout << s << endl; } return 0; }