func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   int num[30];   char ans[100050];   int gcd(int a, int b) {     if (b == 0) return a;     return gcd(b, a % b);   }   int main() {     cin >> n;     int neven = 0;     int sut = 0;     for (int i = 0; i < n; i++) {       cin >> num[i];       if (num[i] % 2) neven++;       sut += num[i];     }     if (n == 1) {       printf( %d n , num[0]);       for (int i = 1; i <= num[0]; i++) printf( a );       puts(  );       return 0;     }     if (neven > 1) {       puts( 0 );       for (int i = 0; i < n; i++)         for (int k = 0; k < num[i]; k++) printf( %c ,  a  + i);       puts(  );     } else {       int counts = num[0];       for (int i = 1; i < n; i++) {         counts = gcd(counts, num[i]);       }       if (counts % 2 == 1) {         int l = 1, r = sut / counts;         for (int i = 0; i < n; i++) {           if (num[i] & 1) {             num[i]--;             ans[(sut / counts + 1) / 2] = i +  a ;           }           for (int k = num[i] / counts; k > 0; k -= 2) {             ans[l++] = i +  a ;             ans[r--] = i +  a ;           }         }         l = sut / counts + 1;         int subarry = sut / counts;         for (int i = 2; i <= counts; i++) {           for (int k = 1; k <= subarry; k++) {             ans[l] = ans[l - (k * 2 - 1)];             l++;           }         }         printf( %d n , counts);       } else {         int subarry = sut / counts;         int l = 1;         for (int i = 0; i < n; i++) {           for (int k = 1; k <= num[i] / counts; k++) ans[l++] = i +  a ;         }         for (int i = 2; i <= counts; i++) {           for (int k = 1; k <= subarry; k++) {             ans[l] = ans[l - (k * 2 - 1)];             l++;           }         }         printf( %d n , counts);       }       for (int i = 1; i <= sut; i++) {         printf( %c , ans[i]);       }       puts(  );     }     return 0;   }   