#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, const U &b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, const U &b) {
  if (a < b) a = b;
}
const int inf = 0x3f3f3f3f;
const int mod = 1000000007;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const double pi = acosl(-1.), eps = 1e-9;
inline int power(int a, int b, int m = mod, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
int main() {
  int n, one = 0, two = 0;
  scanf("%d", &n);
  for (int i = 1, j; i <= n; i++) {
    scanf("%d", &j);
    if (j == 1)
      one++;
    else
      two++;
  }
  if (one == 0) {
    for (int i = 0; i < two; i++) printf("2 ");
  } else {
    if (two == 0) {
      for (int i = 0; i < one; i++) printf("1 ");
    } else {
      printf("2 1 ");
      for (int i = 1; i < two; i++) printf("2 ");
      for (int i = 1; i < one; i++) printf("1 ");
    }
  }
  return 0;
}
