#include <bits/stdc++.h>
using namespace std;
vector<int> pr;
int a[1000001];
void sieve() {
  for (int i = 2; i * i <= 1000000; i++) {
    for (int j = i * i; j <= 1000000; j += i) {
      a[j] = 1;
    }
  }
  for (int j = 2; j <= 400000; j++) {
    if (!a[j]) {
      pr.push_back(j);
    }
  }
}
signed main() {
  int n;
  cin >> n;
  int c1 = 0, c2 = 0;
  for (int i = 0; i < n; ++i) {
    int p;
    cin >> p;
    if (p == 1) {
      c1++;
    } else {
      c2++;
    }
  }
  vector<int> v;
  if (c1 == 1 && c2 == 1) {
    cout << "2 1" << endl;
    return 0;
  } else if (c1 == 0) {
    for (int i = 0; i < n; i++) {
      v.push_back(2);
    }
  } else if (c2 == 0) {
    for (int i = 0; i < n; i++) {
      v.push_back(1);
    }
  } else if (c1 == 1) {
    if (c2 >= 1) {
      v.push_back(2);
      v.push_back(1);
      for (int i = 2; i < n; i++) {
        v.push_back(2);
      }
    }
  } else if (c2 == 1) {
    if (c1 >= 1) {
      v.push_back(2);
      v.push_back(1);
      for (int i = 2; i < n; i++) {
        v.push_back(1);
      }
    }
  } else {
    v.push_back(2);
    v.push_back(1);
    for (int i = 0; i < c2 - 1; i++) {
      v.push_back(2);
    }
    for (int i = 0; i < c1 - 1; i++) {
      v.push_back(1);
    }
  }
  for (auto i : v) {
    cout << i << " ";
  }
}
