#include <bits/stdc++.h>
using namespace std;
int a[3];
int main() {
  memset(a, 0, sizeof(a));
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    int x;
    cin >> x;
    a[x]++;
  }
  if (a[2] == 0) {
    for (int i = 0; i < (n); ++i)
      cout << "1"
           << " ";
    return 0;
  }
  cout << "2"
       << " ";
  if (a[1] % 2 == 1) {
    for (int i = 0; i < (a[1]); ++i)
      cout << "1"
           << " ";
    for (int i = 0; i < (a[2] - 1); ++i)
      cout << "2"
           << " ";
    return 0;
  }
  for (int i = 0; i < (a[1] - 1); ++i)
    cout << "1"
         << " ";
  for (int i = 0; i < (a[2] - 1); ++i)
    cout << "2"
         << " ";
  if (a[1] != 0)
    cout << "1"
         << " ";
  return 0;
}
