#include <bits/stdc++.h>
using namespace std;
struct P {
  int x, y;
  bool operator<(const P &a) const {
    if (y != a.y) return y > a.y;
    return x > a.x;
  }
};
vector<int> v;
vector<int> v1;
int i, n, d, m, k, a, b, c;
int e;
int o[1];
int l[1];
int j[1];
int dx[10] = {0, 1, 0, -1, 1, 1, -1, -1}, dy[10] = {1, 0, -1, 0, 1, -1, 1, -1},
    dz[10] = {0, 0, 0, 0, 1, -1};
int px[10] = {-1, 1, 1, -1, 1, 1, -1, -1},
    py[10] = {1, 1, -1, -1, 1, -1, 1, -1};
long long mod = 1000000007, mod2 = 1000000009, mod3 = 2017;
long long x, z, y;
double pi = 3.14159265;
P u[1];
stack<int> s;
queue<int> q, q1;
char r[1], r2[1];
bool as(P a, P b) { return a.x > b.x; }
int main() {
  scanf("%d", &a);
  for (int t = 1; t <= a; t++) {
    scanf("%d", &n);
    if (n % 2)
      c++;
    else
      d++;
  }
  if (d) {
    printf("2 ");
    d--;
  }
  if (c) {
    printf("1 ");
    c--;
  }
  for (; d; d--) printf("2 ");
  for (; c; c--) printf("1 ");
}
