#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e18;
const long long int mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  long long int t, n, i, p, l, x, s, j, one = 0, two = 0;
  cin >> n;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == 1)
      one++;
    else
      two++;
  }
  if (one == 0 || two == 0) {
    for (long long int i = 0; i < n; i++) cout << arr[i] << " ";
    cout << endl;
  } else {
    cout << 2 << " " << 1 << " ";
    one--, two--;
    for (long long int i = 0; i < n - 2; i++) {
      if (two != 0) {
        cout << 2 << " ";
        two--;
      } else if (one != 0) {
        cout << 1 << " ";
        one--;
      }
    }
    cout << endl;
  }
}
