#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  vector<long long> c(3);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    c[v[i]]++;
  }
  if (c[2]) {
    cout << 2 << " ";
    c[2]--;
  }
  if (c[1]) {
    cout << 1 << " ";
    c[1]--;
  }
  while (c[2]) {
    cout << 2 << " ";
    c[2]--;
  }
  while (c[1]) {
    cout << 1 << " ";
    c[1]--;
  }
  return 0;
}
