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