#include <bits/stdc++.h>
using namespace std;
int n, cnt[3] = {0, 0, 0};
int a[200001], idx = 1;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  int t;
  if (n == 1) {
    cin >> n;
    cout << n << endl;
    return 0;
  }
  for (long long i = (0); i < (n); ++i) {
    cin >> t;
    cnt[t]++;
    cnt[0] += t;
  }
  if (cnt[2]) {
    a[idx++] = 2;
    cnt[2]--;
  }
  if (cnt[1]) {
    a[idx++] = 1;
    cnt[1]--;
  }
  for (long long i = (0); i < (cnt[2]); ++i) a[idx++] = 2;
  for (long long i = (0); i < (cnt[1]); ++i) a[idx++] = 1;
  for (long long i = (1); i < (n + 1); ++i) cout << a[i] << ' ';
  cout << endl;
  return 0;
}
