#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
int main() {
  cin.tie(0), ios::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> arr(n);
  int c1 = 0, c2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == 1)
      c1++;
    else
      c2++;
  }
  if (!c1) {
    while (c2--) cout << "2 ";
    cout << '\n';
  } else if (!c2) {
    while (c1--) cout << "1 ";
    cout << '\n';
  } else {
    cout << "2 1 ", c1--, c2--;
    while (c2--) cout << "2 ";
    while (c1--) cout << "1 ";
    cout << '\n';
  }
  return 0;
}
