#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const long long mod = 998244353;
const int inf = 0x3f3f3f3f;
int a[maxn], num[10];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    num[a[i]]++;
  }
  if (num[1] && num[2]) {
    num[2]--;
    cout << 2 << " ";
    num[1]--;
    cout << 1 << " ";
    while (num[2]) {
      cout << 2 << " ";
      num[2]--;
    }
    while (num[1]) {
      cout << 1 << " ";
      num[1]--;
    }
  } else if (num[1] == 0) {
    for (int i = 1; i <= num[2]; i++) {
      cout << 2 << " ";
    }
  } else {
    for (int i = 1; i <= num[1]; i++) {
      cout << 1 << " ";
    }
  }
  return 0;
}
