#include using namespace std; typedef long long ll; typedef vector< int > vi; typedef vector< vi > vvi; typedef vector< ll > vl; typedef vector< vl > vvl; typedef pair< int, int > pii; typedef vector< pii > vp; typedef vector< double > vd; typedef vector< vd > vvd; typedef vector< string > vs; template< class T1, class T2 > int upmin( T1 &x, T2 v ){ if( x > v ){ x = v; return 1; } return 0; } template< class T1, class T2 > int upmax( T1 &x, T2 v ){ if( x < v ){ x = v; return 1; } return 0; } const int INF = 0x3f3f3f3f; int N; ll X; vi A; void init(){ cin >> N >> X; A = vi( N ); for( int i = 0; i < N; ++i ){ cin >> A[ i ]; } } map< int, queue< int > > val2original_pos; set< pair< ll, int > > partial; vvi dp; vvi dc; // decision int dp_max_sum; void preprocess(){ if( N <= 20 ){ for( int s = 0; s < 1 << N; ++s ){ ll sum = 0; for( int i = 0; i < N; ++i ){ if( s & 1 << i ){ sum += A[ i ]; } } if( sum == X ){ for( int i = 0; i < N; ++i ){ cout << "xo"[ s >> i & 1 ]; } cout << endl; exit( 0 ); } } cout << "No" << endl; exit( 0 ); } for( int i = 0; i < A.size(); ++i ){ val2original_pos[ A[ i ] ].emplace( i ); } sort( A.begin(), A.end(), greater< int >() ); for( int s = 0; s < 1 << 20; ++s ){ ll sum = 0; for( int i = 0; i < 20; ++i ){ if( s & 1 << i ){ sum += A[ i ]; } } partial.emplace( sum, s ); } for( int i = 20; i < N; ++i ){ dp_max_sum += A[ i ]; } assert( dp_max_sum < ( int ) 1e5 ); dp = dc = vvi( N - 20 + 1, vi( dp_max_sum + 1 ) ); dp[ 0 ][ 0 ] = 1; for( int i = 0; i < N - 20; ++i ){ for( int j = dp_max_sum - A[ 20 + i ]; j >= 0; --j ){ if( not dp[ i ][ j ] ) continue; dp[ i + 1 ][ j + A[ 20 + i ] ] = dc[ i + 1 ][ j + A[ 20 + i ] ] = 1; dp[ i + 1 ][ j ] = 1; dc[ i + 1 ][ j ] = 0; } } } void solve(){ for( int i = 0; i <= dp_max_sum; ++i ){ if( not dp[ N - 20 ][ i ] ) continue; auto it = partial.lower_bound( make_pair( X - i, 0 ) ); if( it == partial.end() or it->first != X - i ) continue; vector< char > ans( N, 'x' ); for( int j = 0; j < 20; ++j ){ if( it->second & 1 << j ){ ans[ val2original_pos[ A[ j ] ].front() ] = 'o'; val2original_pos[ A[ j ] ].pop(); } } for( int j = N - 20, k = i; j > 0; --j ){ if( dc[ j ][ k ] ){ ans[ val2original_pos[ A[ 20 + j - 1 ] ].front() ] = 'o'; val2original_pos[ A[ 20 + j - 1 ] ].pop(); k -= A[ 20 + j - 1 ]; } } for( int j = 0; j < N; ++j ){ cout << ans[ j ]; } cout << endl; exit( 0 ); } cout << "No" << endl; } signed main(){ ios::sync_with_stdio( 0 ); init(); preprocess(); solve(); return 0; }