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