#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
const int inf = INT_MAX;
const long long inff = 1e18;
const long long mod = 1e9 + 7;
int a[maxn];
int n;
void print() {
  for (int i = 1; i <= n; i++) cout << a[i] << ' ';
  exit(0);
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  int _1 = 0, _2 = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 1)
      _1++;
    else
      _2++;
  }
  if (_1 == 0 || _2 == 0) print();
  a[1] = 2;
  a[2] = 1;
  _1--, _2--;
  int now = 3;
  while (_2--) a[now++] = 2;
  while (_1--) a[now++] = 1;
  print();
}
