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