#include <bits/stdc++.h>
int n, num1, num2;
int main() {
  scanf("%d", &n);
  while (n--) {
    int a;
    scanf("%d", &a);
    a == 1 ? num1++ : num2++;
  }
  if (num2--) {
    printf("2 ");
    if (num1--) {
      printf("1 ");
      while (num2--) printf("2 ");
      while (num1--) printf("1 ");
    } else
      while (num2--) printf("2 ");
  } else
    while (num1--) printf("1 ");
  return 0;
}
