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