#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < n; ++i) {
    static int x;
    scanf("%d", &x);
    if (x == 1)
      ++cnt1;
    else
      ++cnt2;
  }
  if (cnt2) {
    printf("2 ");
    --cnt2;
    if (cnt1) {
      printf("1 ");
      --cnt1;
    }
  }
  while (cnt2--) printf("2 ");
  while (cnt1--) printf("1 ");
}
