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