func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( Ofast )   #pragma GCC target( avx,avx2,fma )   using namespace std;   long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }   long long lcm(long long a, long long b) { return ((a * b) / (gcd(a, b))); }   bool compare(const pair<long long, long long> &a,                const pair<long long, long long> &b) {     return a.second < b.second;   }   long long ceil(long long a, long long b) { return (a + b - 1) / b; }   long long binpowmod(long long a, long long b, long long m) {     long long res = 1;     while (b > 0) {       if (b & 1) {         res = ((res % m) * (a % m)) % m;       }       a = ((a % m) * (a % m)) % m;       b >>= 1;     }     res %= m;     return res;   }   long long binpow(long long a, long long b) {     long long res = 1;     while (b > 0) {       if (b & 1) {         res = ((res) * (a));       }       a = ((a) * (a));       b >>= 1;     }     return res;   }   void swap(long long *a, long long *b) {     long long temp = *a;     *a = *b;     *b = temp;   }   long long sum_digits(long long x) {     long long s = 0;     while (x) {       s += (x % 10);       x /= 10;     }     return s;   }   bool is_perfect_square(long long n) {     return (floor(double(sqrt(n))) == ceil(double(sqrt(n))));   }   vector<int> pr;   void prime() {     const int N = 10000000;     int lp[N + 1] = {0};     for (int i = 2; i <= N; ++i) {       if (lp[i] == 0) {         lp[i] = i;         pr.push_back(i);       }       for (int j = 0; j < (int)pr.size() && pr[j] <= lp[i] && i * pr[j] <= N; ++j)         lp[i * pr[j]] = pr[j];     }   }   long long bs(vector<long long> &arr, long long l, long long r, long long x) {     long long mid = 0;     if (r >= l) {       mid = l + (r - l) / 2;       if (arr[mid] == x) return mid;       if (arr[mid] > x) return bs(arr, l, mid - 1, x);       return bs(arr, mid + 1, r, x);     }     return -1;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int n;     cin >> n;     std::vector<long long> v;     int c1 = 0, c2 = 0;     for (int i = (0); i < (n); i++) {       int x;       cin >> x;       if (x == 1)         c1++;       else         c2++;     }     if (c1 == 0)       v = std::vector<long long>(n, 2);     else if (c2 == 0)       v = std::vector<long long>(n, 1);     else {       v.push_back(2);       c2--;       v.push_back(1);       c1--;       while ((c2)--) v.push_back(2);       while ((c1)--) v.push_back(1);     }     for (int i = (0); i < (n); i++) cout << v[i] <<    ;   }   