#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 1e5 + 4;
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int arr[n], cnt[3];
  cnt[1] = cnt[2] = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    cnt[arr[i]]++;
  }
  if (!cnt[1] || !cnt[2]) {
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
  } else {
    cout << "2 1 ";
    for (int i = 0; i < cnt[2] - 1; i++) cout << "2 ";
    for (int i = 0; i < cnt[1] - 1; i++) cout << "1 ";
  }
  return 0;
}
