#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long cnt1 = 0, cnt2 = 0;
  for (long long i = 0; i < n; i++) {
    long long val;
    cin >> val;
    if (val == 1)
      cnt1++;
    else
      cnt2++;
  }
  vector<long long> v;
  if (cnt2 > 0) {
    if (cnt1 > 0) {
      v.push_back(2);
      v.push_back(1);
      cnt1--;
      cnt2--;
    } else {
      v.push_back(2);
      cnt2--;
    }
  } else {
    v.push_back(1);
    cnt1--;
  }
  while (cnt2 > 0) {
    v.push_back(2);
    cnt2--;
  }
  while (cnt1 > 0) {
    v.push_back(1);
    cnt1--;
  }
  for (long long i = 0; i < n; i++) {
    cout << v[i] << " ";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
