#include <bits/stdc++.h>
using namespace std;
int n;
int cnt1;
int cnt2;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    if (tmp == 1) {
      cnt1++;
    } else {
      cnt2++;
    }
  }
  if (cnt2 > 0) {
    cnt2--;
    cout << 2 << " ";
  }
  if (cnt1 > 0) {
    cnt1--;
    cout << 1 << " ";
  }
  for (int i = 0; i < cnt2; i++) {
    cout << 2 << " ";
  }
  for (int i = 0; i < cnt1; i++) {
    cout << 1 << " ";
  }
}
