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