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