#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, one = 0, two = 0;
  cin >> n;
  while (n--) {
    int a;
    cin >> a;
    if (a & 1)
      one++;
    else
      two++;
  }
  if (two != 0) cout << "2 ";
  --two;
  if (one != 0) cout << "1 ";
  --one;
  for (int i = 0; i < two; i++) cout << "2 ";
  for (int j = 0; j < one; j++) cout << "1 ";
  cout << endl;
}
