#include <bits/stdc++.h>

#define ll long long

int main()
{
    ll N;
    std::vector<ll> pos, neg;

    std::cin >> N;
    for(ll i = 0; i < N; i++)
    {
        ll x;
        std::cin >> x;
        if(x > 0)
            pos.push_back(x);
        if(x < 0)
            neg.push_back(std::abs(x));
    }

    std::sort(pos.begin(), pos.end());
    std::sort(neg.begin(), neg.end());

    while(true)
    {
        if(pos[0] == 0 || neg[0] == 0)
            break;

        if(pos[0] > neg[0])
        {
            neg.erase(neg.begin());
            std::cout << "2";
        }
        if(pos[0] <= neg[0])
        {
            pos.erase(pos.begin());
            std::cout << "1";
        }

        for(ll &x : pos)
            x--;
        
        for(ll &x : neg)
            x--;

        if(pos.size() == 0 && neg.size() == 0)
            break;
    }

    return 0;
}