#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  int one = 0, two = 0;
  for (int i = 0; i < n; i++) {
    int data;
    cin >> data;
    data == 1 ? ++one : ++two;
  }
  if (two) cout << 2 << " ", --two;
  if (one) cout << 1 << " ", --one;
  while (two) cout << 2 << " ", --two;
  while (one) cout << 1 << " ", --one;
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << "s.\n";
  return 0;
}
