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