#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, n, j;
  scanf("%d", &n);
  vector<int> a, b;
  vector<int>::iterator i;
  for (j = 0; j < n; j++) {
    scanf("%d", &x);
    if (x == 1)
      a.push_back(x);
    else
      b.push_back(x);
  }
  if (a.size() == 0)
    for (j = 0; j < n; j++) printf("2 ");
  else if (b.size() == 0)
    for (j = 0; j < n; j++) printf("1 ");
  else {
    printf("2 1 ");
    a.erase(a.begin());
    b.erase(b.begin());
    for (i = b.begin(); i != b.end(); i++) printf("2 ");
    for (i = a.begin(); i != a.end(); i++) printf("1 ");
  }
}
