#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n;
  int cnt1 = 0, cnt2 = 0;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    if (x == 1)
      ++cnt1;
    else
      ++cnt2;
  }
  if (cnt2--) cout << "2 ";
  if (cnt1--) cout << "1 ";
  while (cnt2-- > 0) cout << "2 ";
  while (cnt1-- > 0) cout << "1 ";
  cout << endl;
  return 0;
}
