#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  map<long long, long long> d;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    d[x]++;
  }
  long long p = 1;
  while (d[2] > 0 and p > 0) {
    cout << 2 << ' ';
    p--;
    d[2]--;
    n--;
  }
  p = 1;
  while (d[1] > 0 and p > 0) {
    cout << 1 << ' ';
    d[1]--;
    n--;
    p--;
  }
  while (d[2] > 0) {
    cout << 2 << ' ';
    p--;
    d[2]--;
    n--;
  }
  while (d[1] > 0) {
    cout << 1 << ' ';
    d[1]--;
    n--;
  }
  return 0;
}
