#include <bits/stdc++.h>
using namespace std;
int64_t mod = 1e9 + 7;
int main() {
  int64_t n;
  cin >> n;
  int64_t cnt1 = 0;
  int64_t cnt2 = 0;
  for (int64_t i = 0; i < n; i++) {
    int64_t a;
    cin >> a;
    a == 1 ? cnt1++ : cnt2++;
  }
  if (cnt1 == 0) {
    for (int64_t i = 0; i < n; i++) cout << 2 << " ";
    cout << endl;
    return 0;
  }
  if (cnt2 == 0) {
    for (int64_t i = 0; i < n; i++) cout << 1 << " ";
    cout << endl;
    return 0;
  }
  cout << 2 << " " << 1 << " ";
  cnt1--;
  cnt2--;
  for (int64_t i = 0; i < cnt2; i++) cout << 2 << " ";
  for (int64_t i = 0; i < cnt1; i++) cout << 1 << " ";
  cout << endl;
  return 0;
}
