#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, one = 0, two = 0;
  cin >> a;
  vector<long long> v(a);
  for (long long i = 0; i < a; i++) {
    cin >> v[i];
    if (v[i] == 1)
      one = one + 1;
    else
      two = two + 1;
  }
  if (one == 0 || two == 0) {
    for (long long i = 0; i < a; i++) cout << v[i] << " ";
  } else {
    cout << 2 << " " << 1 << " ";
    for (long long i = 0; i < two - 1; i++) cout << 2 << " ";
    for (long long i = 0; i < one - 1; i++) cout << 1 << " ";
  }
  return 0;
}
