#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long a = 0, b = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (x == 1)
      a += 1;
    else
      b += 1;
  }
  if (a == 0) {
    for (long long i = 0; i < b; i++) cout << 2 << " ";
    cout << "\n";
  } else if (b == 0) {
    for (long long i = 0; i < a; i++) cout << 1 << " ";
    cout << "\n";
  } else {
    cout << 2 << " " << 1 << " ";
    b -= 1, a -= 1;
    for (long long i = 0; i < b; i++) cout << 2 << " ";
    for (long long i = 0; i < a; i++) cout << 1 << " ";
    cout << "\n";
  }
}
