#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, x, h; vector<int> vn, vp; string s; char c;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> x;
        if (x < 0) {
            vn.push_back(x);
        }
        else {
            vp.push_back(x);
        }
    }
    x = 0;
    sort (vn.begin(), vn.end());
    sort (vp.begin(), vp.end(), greater<int>());
    vn.push_back(0);
    vp.push_back(0);
    if (vn[vn.size()-1] == -1 && vp[vp.size()-1] == 1) {
        cout << 1 << '\n' << 1;
        return 0;
    }
    if (abs(vn[0]) < vp[0]) {
        c = '2';
    }
    else {
        c = '1';
    }
    if (vn.size() > 1 && vp.size() > 1) {
        for (int i = 1; i < n; i++) {
        if (vp[0] == vp[i] || vn[0] == vn[i]) {
            break;
        }
        if (c != '2') {
            c = '2';
            s += c;
            x++;
            h = vn[i];
            vn[i] = vn[vn.size()-1];
            vn[vn.size()-1] = h;
            sort (vn.begin(), vn.end());
            vn[0]--;
            vp[0]++;
        }
        else if (c != '1') {
            c = '1';
            s += c;
            x++;
            h = vp[i];
            vp[i] = vp[vp.size()-1];
            vp[vp.size()-1] = h;
            sort (vp.begin(), vp.end(), greater<int>());
            vn[0]--;
            vp[0]++;
        }
    }
    }
    else {
        x = 2;
        s = "21";
    }
    cout << x << '\n' << s;
}