#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long N = 3e5 + 10;
const long long mod = 1000000007;
long long a[N];
long long cnt[3];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  if (cnt[2] > 0) cout << "2 ";
  cnt[2]--;
  if (cnt[1] > 0) cout << "1 ";
  cnt[1]--;
  for (long long i = 1; i <= cnt[2]; i++) cout << 2 << " ";
  for (long long i = 1; i <= cnt[1]; i++) cout << 1 << " ";
  return 0;
}
