#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 34;
long long a[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  long long imadva = 0, imajedan = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    imadva += (a[i] == 2);
    imajedan += (a[i] == 1);
  }
  if (!imajedan || !imadva) {
    for (int i = 1; i <= n; i++) {
      cout << a[i] << " ";
    }
    return 0;
  }
  cout << "2 1 ";
  for (int i = 1; i < imadva; i++) {
    cout << "2 ";
  }
  for (int i = 1; i < imajedan; i++) {
    cout << "1 ";
  }
}
