#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  int count2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == 2) {
      count2++;
    }
  }
  int count1 = n - count2;
  int size = n;
  int i = 0;
  if (size > 1) {
    if (count2 > 0 && count1 > 0) {
      arr[0] = 2;
      arr[1] = 1;
      size = size - 2;
      i = i + 2;
      count1--;
      count2--;
    }
  }
  while (size > 0 && count2 > 0) {
    arr[i] = 2;
    count2--;
    size--;
    i++;
  }
  while (size > 0 && count1 > 0) {
    arr[i] = 1;
    size--;
    count1--;
    i++;
  }
  for (int i = 0; i < n; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
  return 0;
}
