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