#include <bits/stdc++.h>
using namespace std;
void fun(long long arr[], long long N) {
  long long one = 0, two = 0;
  for (long long i = 0; i < N; i++)
    if (arr[i] == 1)
      one++;
    else
      two++;
  if (two == 0) return;
  if (one == 0) return;
  long long ind = 0;
  arr[ind++] = 2;
  two--;
  bool evenone = (one % 2 == 0) ? true : false;
  if (evenone) one--;
  for (long long i = 0; i < one; i++) arr[ind++] = 1;
  for (long long i = 0; i < two; i++) arr[ind++] = 2;
  if (evenone) arr[ind++] = 1;
}
int main() {
  long long N;
  cin >> N;
  long long arr[N];
  for (long long i = 0; i < N; i++) cin >> arr[i];
  fun(arr, N);
  for (long long i = 0; i < N; i++) cout << arr[i] << " ";
}
