#include <bits/stdc++.h>
using namespace std;
int n;
int ones, twos;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    int c;
    cin >> c;
    if (c == 1)
      ones++;
    else
      twos++;
  }
  if (twos) {
    cout << "2 ";
    twos--;
  }
  if (ones) {
    cout << "1 ";
    ones--;
  }
  while (twos) {
    cout << "2 ";
    twos--;
  }
  while (ones) {
    cout << "1 ";
    ones--;
  }
  return 0;
}
