#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int db1 = 0, db2 = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a == 1)
      db1++;
    else
      db2++;
  }
  if (db2 != 0) {
    cout << "2 ";
    db2--;
  }
  if (db1 != 0) {
    cout << "1 ";
    db1--;
  }
  for (int i = 0; i < db2; i++) cout << "2 ";
  for (int i = 0; i < db1; i++) cout << "1 ";
  cout << "\n";
  return 0;
}
