func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, a[27], sum, gcd;   int odd;   int _gcd(int x, int y) {     if (x == 0 or x == y) return y;     if (x > y) swap(x, y);     while (y % x) {       y %= x;       swap(x, y);     }     return x;   }   int main() {     scanf( %d , &n);     for (int i = 0; i < n; i++) {       scanf( %d , a + i);       if (a[i] & 1) odd++;       sum += a[i];       gcd = _gcd(gcd, a[i]);     }     if (odd > 1) {       printf( %d n , 0);       int k = 0;       string s(sum,  0 );       for (int i = 0; i < n; i++) {         int j = 0;         while (j < a[i]) {           s[j + k] =  a  + i;           j++;         }         k += a[i];       }       cout << s << endl;       return 0;     }     for (int i = 0; i < n; i++) a[i] /= gcd;     sum /= gcd;     printf( %d n , gcd);     if (odd) {       string s(sum,  0 );       int k = 0;       for (int i = 0; i < n; i++) {         int j = 0;         while (j < a[i] / 2) {           s[j + k] =  a  + i;           s[sum - 1 - j - k] =  a  + i;           j++;         }         if (a[i] & 1) odd = i;         k += a[i] / 2;       }       s[k] = odd +  a ;       for (int i = 0; i < gcd; i++) cout << s;       cout << endl;     } else {       string s(sum,  0 );       string t(sum,  0 );       int k = 0;       for (int i = 0; i < n; i++) {         int j = 0;         while (j < a[i]) {           s[j + k] =  a  + i;           t[sum - 1 - j - k] =  a  + i;           t[sum - 1 - j - k] =  a  + i;           j++;         }         k += a[i];       }       for (int i = 0; i < gcd / 2; i++) cout << s << t;       cout << endl;     }   }   