#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
inline void add(int &x, int y, int P) { x = x + y >= P ? x + y - P : x + y; }
inline void sub(int &x, int y, int P) { x = x - y < 0 ? x - y + P : x - y; }
inline int mul(int x, int y, int P) {
  return 1ll * x * y - 1ll * x * y / P * P;
}
inline void chkmax(int &x, int y) { x < y ? (x = y) : 0; }
inline void chkmin(int &x, int y) { x > y ? (x = y) : 0; }
inline int max(int x, int y) { return x > y ? x : y; }
inline int min(int x, int y) { return x < y ? x : y; }
inline void swap(int &x, int &y) { x ^= y ^= x ^= y; }
void file() {}
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar())
    x = (x << 1) + (x << 3) + ch - '0';
  return x * f;
}
int main() {
  int n = read(), cnt1 = 0, cnt2 = 0;
  for (register int i = (1); i <= (n); ++i) {
    int x = read();
    if (x == 1)
      cnt1++;
    else
      cnt2++;
  }
  if (cnt2) printf("2 "), cnt2--;
  if (cnt1) printf("1 "), cnt1--;
  for (register int i = (1); i <= (cnt2); ++i) printf("2 ");
  for (register int i = (1); i <= (cnt1); ++i) printf("1 ");
  return 0;
}
