#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int arr[n], fre[3] = {0};
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    ++fre[arr[i]];
  }
  if (fre[1] == 0 || fre[2] == 0) {
    for (int i = 0; i < n; i++) printf("%d ", arr[i]);
  } else {
    printf("2 1 ");
    fre[1]--;
    fre[2]--;
    while (fre[2] > 0) {
      printf("2 ");
      fre[2]--;
    }
    while (fre[1] > 0) {
      printf("1 ");
      fre[1]--;
    }
  }
}
