#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#define ll long long
#define N (2<<16)
using namespace std;
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#define ll long long
#define N (2<<16)
using namespace std;
int r (double d) {
if (d % 1 >= 0.5) return (int)d + 1;
return (int)d;
}
int main () {
int n;
cin>>n;
double v[n];
ll s = 0;
for (int i = 0; i < n; i++) {
cin>>v[i];
s += (long long)r(v[i]);
}
while (s / 2 > 10000000) {
for (int i = 0; i < n; i++) {
v[i] /= 10;
}
s /= 10;
}
s /= 2;
int x[s + 1];
for (int i = 0; i < s + 1; i++) x[i] = 0;
x[0] = 1;
for (int i = 0; i < n; i++) {
for (int z = s; z >= v[i]; z--) {
if (x[z]) continue;
if (x[z - r(v[i])]) x[z] = i + 1;
}
}
bool b[n];
//for (int i : x) cout<<i<<" ";
//cout<<endl;
for (int i = 0; i < n; i++) b[i] = false;
for (int i = s; i >= 0; i--) {
if (x[i]) {
while (i != 0) {
//cout<<x[i] - 1<<endl;
b[x[i] - 1] = true;
i -= r(v[x[i] - 1]);
}
break;
}
}
for (bool r : b) {
cout<<(2 - (int)r)<<" ";
}
cout<<endl;
}