#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long b[n], sum = 0, two = 0, one = 0, presum = 0;
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    if (b[i] == 2)
      two++;
    else
      one++;
    sum += b[i];
  }
  if (sum == 1)
    cout << 1;
  else {
    while (presum != sum) {
      if (presum == 0) {
        if (two > 0) {
          cout << 2 << " ";
          two--;
          presum += 2;
        } else {
          cout << "1 1 ";
          one -= 2;
          presum += 2;
        }
      } else if (presum % 2 == 0) {
        if (one > 0) {
          cout << 1 << " ";
          one--;
          presum++;
        } else {
          if (two > 0) {
            cout << 2 << " ";
            two--;
            presum += 2;
          }
        }
      } else {
        if (two > 0) {
          cout << 2 << " ";
          two--;
          presum += 2;
        } else {
          if (one > 0) {
            one--;
            cout << 1 << " ";
            presum++;
          }
        }
      }
    }
  }
  return 0;
}
