#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; template istream& operator >> (istream& is, vector& vec){for(T& val: vec) is >> val; return is;} template istream& operator , (istream& is, T& val){ return is >> val;} template ostream& operator << (ostream& os, vector& vec){for(int i=0; i> n,x; vector a(n); cin >> a; deque> b(n); long long sum = 0; for(int i=0; i> c(all_size); while(b.size() && c.size() dp1((1<>j)&1) tmp += c[j].first; } dp1[i] = tmp; } vector<__int128> dp2(sum+1, 0); for(int i=0; i=0; j--){ if(dp2[j] == 0 && j != 0) continue; dp2[j+b[i].first] = j | (__int128(1)<>j)&1) ans[c[j].second] = 'o'; } if(rem == 0){ cout << ans << endl; return 0; } if(rem <= sum && dp2[rem] != 0){ for(__int128 j=0; j>j)&1){ ans[b[j].second] = 'o'; } } cout << ans << endl; return 0; } } cout << "No" << endl; return 0; }