#include <bits/stdc++.h>
using namespace std;
long long int i, j, k, in;
vector<long long int> adj[200005];
bool visited[200005] = {0};
long long int start[200005] = {0};
long long int sub_t[200005] = {0}, node_count = 0;
long long int level[200005] = {0};
vector<long long int> dfs_order;
vector<long long int> bfs_order;
long long int sqr(long long int x) { return 1ll * x * x; }
void printa(long long int a[], long long int n) {
  for (i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << "\n";
}
void printv(vector<long long int> v) {
  for (i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << "\n";
}
void printg(int n) {
  for (i = 0; i < n; i++) {
    cout << i << " : ";
    for (auto it : adj[i]) {
      cout << it << " ";
    }
    cout << "\n";
  }
}
const long long INF = 9223372036854775807;
const long long mod = 1e9 + 7;
void solve() {
  long long int n;
  cin >> n;
  long long int ones = 0, twos = 0;
  for (i = 0; i < n; i++) {
    cin >> in;
    if (in == 1)
      ones++;
    else
      twos++;
  }
  if (ones == 0 || twos == 0) {
    for (i = 0; i < n; i++) {
      cout << (ones != 0 ? 1 : 2) << " ";
    }
  } else {
    vector<long long int> ans;
    ans.emplace_back(2);
    ans.emplace_back(1);
    for (i = 0; i < twos - 1; i++) {
      ans.emplace_back(2);
    }
    for (i = 0; i < ones - 1; i++) {
      ans.emplace_back(1);
    }
    for (auto it : ans) {
      cout << it << " ";
    }
  }
}
void call() {
  long long int t;
  t = 1;
  for (long long int i = 1; i <= t; i++) {
    solve();
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  call();
}
