// Arup Guha
// 6/2/2026
// Solution to ATM Maintenance
// https://open.kattis.com/problems/atmmaintenance

using namespace std;
#include <bits/stdc++.h>

int main() {

    int numP, money;
    cin >> numP >> money;

    // Process cases.
    for (int i=0; i<numP; i++) {

        int amt;
        cin >> amt;

        // We have enough, give it.
        if (amt <= money) {
            cout << "1";
            money -= amt;
        }

        // We don't.
        else {
            cout << "0";
        }
    }

    // Probably not necessary.
    cout << endl;
    return 0;
}
