#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n, i, j, k;
  cin >> n;
  long long s1 = 0, s2 = 0;
  for (i = 1; i <= n; i++) {
    cin >> k;
    if (k == 1)
      s1++;
    else
      s2++;
  }
  if (s1 == n) {
    for (i = 1; i <= n; i++) cout << "1 ";
  } else if (s2 == n) {
    for (i = 1; i <= n; i++) cout << "2 ";
  } else {
    cout << "2 ";
    cout << "1 ";
    s1--;
    s2--;
    for (i = 1; i <= s2; i++) cout << "2 ";
    for (i = 1; i <= s1; i++) cout << "1 ";
  }
  return 0;
}
