#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, a1, a2, x, i, j;
  a1 = 0, a2 = 0;
  cin >> n;
  if (n == 1) {
    cin >> x;
    cout << x;
    return 0;
  }
  for (i = 1; i <= n; ++i) {
    cin >> x;
    if (x == 1)
      ++a1;
    else
      ++a2;
  }
  if (a1 == 0) {
    for (j = 1; j <= a2; ++j) cout << 2 << " ";
    return 0;
  }
  if (a2 == 0) {
    for (j = 1; j <= a1; ++j) cout << 1 << " ";
    return 0;
  }
  if (a1 == 1) {
    cout << "2 1 ";
    for (j = 1; j < a2; ++j) cout << 2 << " ";
    return 0;
  }
  if (a1 == 2) {
    cout << 2 << " ";
    cout << 1 << " ";
    for (j = 1; j < a2; ++j) cout << 2 << " ";
    cout << 1;
    return 0;
  }
  if (a1 % 2 == 0) {
    cout << "2 1 ";
    for (j = 1; j < a2; ++j) cout << 2 << " ";
    for (j = 1; j < a1; ++j) cout << 1 << " ";
    return 0;
  }
  if (a1 % 2 == 1) {
    for (j = 1; j <= a1; ++j) cout << 1 << " ";
    for (j = 1; j <= a2; ++j) cout << 2 << " ";
    return 0;
  }
}
