#include <bits/stdc++.h>
using namespace std;
int faltu = 0;
int che = 1;
int count(long long int n) {
  if (n == 0) return faltu;
  int j = n % 10;
  if (j == 0 || j == 1)
    ;
  else
    che = 0;
  n /= 10;
  faltu++;
  return count(n);
}
int N = 1e5;
vector<bool> prime(N + 1, true);
vector<int> prim;
void pri() {
  for (int i = 2; i * i <= N; i++) {
    if (prime[i]) {
      for (int j = i * i; j <= N; j += i) {
        prime[j] = false;
      }
    }
  }
  for (int i = 2; i <= N; i++) {
    if (prime[i]) prim.push_back(i);
  }
  return;
}
long long dp[200002];
void fact() {
  dp[0] = 1;
  for (int i = 1; i < 200002; i++) {
    dp[i] = (dp[i - 1] * i) % 1000000007;
  }
}
long long moduleinverse(long long x) {
  long long res = 1;
  long long y = 1000000007 - 2;
  x = x % 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y /= 2;
    x = (x * x) % 1000000007;
  }
  return res;
}
bool chec(int n, int k) {
  while (n) {
    if (n % 10 == k) return true;
    n = n / 10;
  }
  return false;
}
long long int loga(long long int a, long long int k) {
  long long int ans = 0;
  while (a) {
    ans++;
    a /= k;
  }
  return ans;
}
long long int modpow(long long int x, long long int n) {
  if (n == 0) return 1;
  long long int a = modpow(x, n / 2);
  a = (a * a) % 1000000007;
  if (n % 2 == 1) a = (a * x) % 1000000007;
  return a;
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  int cnt1 = 0;
  int cnt = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1)
      cnt1++;
    else
      cnt++;
  }
  if (cnt >= 1) {
    cout << 2 << " ";
    cnt--;
  }
  if (cnt1 >= 1) {
    cout << 1 << " ";
    cnt1--;
  }
  while (cnt--) cout << 2 << " ";
  while (cnt1--) cout << 1 << " ";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  { solve(); }
}
