#include <bits/stdc++.h>
const long long mod = 10e9 + 7;
using namespace std;
int a[200001];
int main() {
  ios::sync_with_stdio(0);
  int n;
  while (~scanf("%d", &n)) {
    memset(a, 0, sizeof(a));
    int cnt1 = 0, cnt0 = 0, x;
    for (int i = 0; i < n; ++i) {
      scanf("%d", &x);
      if (x == 1)
        cnt1 += 1;
      else
        cnt0 += 1;
    }
    int t = cnt1 / 3;
    if (t == 0) {
      if (cnt0) {
        printf("%d ", 2);
        cnt0 -= 1;
      }
      if (cnt1) {
        printf("1 ");
        cnt1 -= 1;
      }
      while (cnt0 > 0) {
        printf("%d ", 2);
        cnt0 -= 1;
      }
      for (int i = 0; i < cnt1; ++i) printf("%d ", 1);
      printf("\n");
    } else {
      if (t > 0) {
        for (int i = 0; i < 3; ++i) printf("%d ", 1);
        cnt1 -= 3;
      }
      while (cnt0 > 0) {
        printf("%d ", 2);
        cnt0 -= 1;
      }
      for (int i = 0; i < cnt1; ++i) printf("%d ", 1);
      printf("\n");
    }
  }
  return 0;
}
