#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
const long long int N = 1e5 + 5;
const long long int INF = 1e10;
long long int mod = 998244353;
long long int dx[4] = {0, 0, +1, -1};
long long int dy[4] = {+1, -1, 0, 0};
long long int n;
void solve() {
  cin >> n;
  long long int c1 = 0, c2 = 0;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    (x == 1 ? c1++ : c2++);
  }
  long long int f = 0;
  for (long long int i = 0; i < n; i++) {
    if (f == 0 and c2 > 0 and c1 > 0) {
      cout << 2 << " " << 1 << " ";
      c2--, c1--;
      f = 1;
    } else if (c2 > 0) {
      cout << 2 << " ";
      c2--;
    } else if (c1 > 0) {
      cout << 1 << " ";
      c1--;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t = 1;
  while (t--) solve();
  return 0;
}
