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