#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
int main() {
  long long n;
  cin >> n;
  long long a[n];
  long long cnt1 = 0, cnt2 = 0;
  long long flag1 = 0, flag2 = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1)
      cnt1++;
    else
      cnt2++;
  }
  if (cnt1 >= 1 && cnt2 >= 1) {
    cout << 2 << " " << 1 << " ";
    cnt1--;
    cnt2--;
    while (cnt2 > 0) {
      cout << 2 << " ";
      cnt2--;
    }
    while (cnt1 > 0) {
      cout << 1 << " ";
      cnt1--;
    }
  } else {
    for (long long i = 0; i < n; i++) cout << a[i] << " ";
  }
  return 0;
}
