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