#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i;
  cin >> n;
  long long a[n];
  map<long long, long long> m;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]]++;
  }
  if (m[1] % 2) {
    if (m[2] != 0) {
      cout << 2 << " ";
      m[2]--;
    }
    for (i = 0; i < m[1]; i++) {
      cout << 1 << " ";
    }
    for (i = 0; i < m[2]; i++) {
      cout << 2 << " ";
    }
    cout << endl;
    return (0);
  }
  if (m[2] != 0) {
    cout << 2 << " ";
    m[2]--;
  }
  for (i = 0; i < m[1] - 1; i++) {
    cout << 1 << " ";
  }
  for (i = 0; i < m[2]; i++) {
    cout << 2 << " ";
  }
  if (m[1] != 0) {
    cout << 1 << " ";
  }
  cout << endl;
}
