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