#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n];
  long long c1 = 0, c2 = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1)
      c1++;
    else
      c2++;
  }
  if (c1 == 0 || c2 == 0) {
    for (int i : a) cout << i << " ";
  } else {
    cout << "2 1 ";
    for (int i = 0; i < c2 - 1; i++) cout << 2 << " ";
    for (int i = 0; i < c1 - 1; i++) cout << 1 << " ";
  }
}
