#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k;
  cin >> n;
  long long int o, t;
  o = 0;
  t = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> k;
    if (k & 1)
      o++;
    else
      t++;
  }
  if (t >= 1) {
    cout << "2 ";
    t--;
  }
  if (o >= 1) {
    cout << "1 ";
    o--;
  }
  while (t) {
    cout << "2 ";
    t--;
  }
  while (o) {
    cout << "1 ";
    o--;
  }
  return 0;
}
