#include <bits/stdc++.h>   using namespace std;   ifstream fin( B.in );   ofstream fout( B.out );   long long n, a[100001], v[100001], heap[100001], pending[100001], s1, s2, ok,       ideal, current, maxv, nr;   string s;   int main() {     cin >> n;     for (int i = 1; i <= 2 * n; ++i) {       cin >> a[i];       v[a[i]]++;     }     for (int i = 10; i <= 99; ++i) {       if (v[i] < 2) continue;       nr = v[i] / 2;       if (nr != 0) {         ++s1;         ++s2;       }       int j;       for (j = 1; j <= 2 * n && nr > 0; ++j) {         if (a[j] == i) {           --nr;           heap[j] = 1;         }       }       nr = v[i] / 2;       for (j = 1; j <= 2 * n && nr > 0; ++j) {         if (a[j] == i && heap[j] != 1) {           --nr;           heap[j] = 2;         }       }     }     ok = 0;     for (int i = 10; i <= 99; ++i) {       if (v[i] != 1) continue;       if (!ok)         s1++;       else         s2++;       for (int j = 1; j <= 2 * n; ++j) {         if (a[j] == i && !heap[j]) {           if (!ok)             heap[j] = 1;           else             heap[j] = 2;         }       }       ok = 1 - ok;     }     for (int i = 10; i <= 99; ++i) {       if (v[i] % 2 != 1 || v[i] == 1) continue;       for (int j = 1; j <= 2 * n; ++j) {         if (a[j] == i && !heap[j]) {           if (!ok)             heap[j] = 1;           else             heap[j] = 2;         }       }       ok = 1 - ok;     }     cout << s1 * s2 <<   n ;     ok = 0;     for (int i = 1; i <= 2 * n; ++i) {       cout << heap[i];       cout <<    ;     }   }   