#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s1 = 0, s2 = 0;
  cin >> n;
  int A[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] == 1)
      s1++;
    else
      s2++;
  }
  if (s1 > 2) {
    cout << 1 << " " << 1 << " " << 1 << " ";
    s1 -= 3;
    while (s2 > 0) {
      cout << 2 << " ";
      s2--;
    }
    while (s1 > 0) {
      cout << 1 << " ";
      s1--;
    }
    return 0;
  }
  if (s1 > 0 && s2 > 0) {
    cout << 2 << " " << 1 << " ";
    s1--;
    s2--;
    while (s2 > 0) {
      cout << 2 << " ";
      s2--;
    }
    while (s1 > 0) {
      cout << 1 << " ";
      s1--;
    }
    return 0;
  }
  if (s1 > 0) {
    while (s1 > 0) {
      cout << 1 << " ";
      s1--;
    }
    return 0;
  }
  while (s2 > 0) {
    cout << 2 << " ";
    s2--;
  }
}
