#include <bits/stdc++.h>
using namespace std;
int a[200005], bk[6];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    bk[a[i]]++;
  }
  if (!bk[1])
    for (int i = 1; i <= n; i++) printf("2 ");
  else if (!bk[2])
    for (int i = 1; i <= n; i++) printf("1 ");
  else {
    printf("2 1 ");
    bk[2]--;
    bk[1]--;
    for (int i = 1; i <= bk[2]; i++) printf("2 ");
    for (int i = 1; i <= bk[1]; i++) printf("1 ");
  }
}
