#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int(i) = (0); (i) < (n); (i)++) cin >> a[i];
  int n1 = count(a, a + n, 1);
  int n2 = count(a, a + n, 2);
  if (n1 == 0 or n2 == 0) {
    for (int(i) = (0); (i) < (n); (i)++) cout << a[i] << " ";
    cout << endl;
    return 0;
  }
  cout << "2"
       << " ";
  cout << "1"
       << " ";
  for (int(i) = (0); (i) < (n2 - 1); (i)++)
    cout << "2"
         << " ";
  for (int(i) = (0); (i) < (n1 - 1); (i)++)
    cout << "1"
         << " ";
}
