#include <bits/stdc++.h>
using namespace std;
char output[1000000];
int v[32];
int bag[32], mybag[32];
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  int _sc = 0;
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < (int)(n); i++) _sc = scanf("%d", &v[i]);
    int L = 0;
    for (int i = 0; i < (int)(n); i++) L += v[i];
    output[L] = 0;
    int q = v[0];
    for (int i = 0; i < (int)(n); i++) q = gcd(q, v[i]);
    const int bagLength = L / q;
    for (int i = 0; i < (int)(n); i++) bag[i] = v[i] / q;
    int next = 0;
    for (int j = 0; j < (int)(bagLength); j++) {
      while (bag[next] == 0) next++;
      output[j] = 'a' + next;
      bag[next]--;
    }
    for (int i = (1); i < (int)(q); i++) {
      if (i % 2 == 0)
        for (int j = 0; j < (int)(bagLength); j++)
          output[bagLength * i + j] = output[j];
      else
        for (int j = 0; j < (int)(bagLength); j++)
          output[bagLength * i + j] = output[bagLength - 1 - j];
    }
    int res;
    if (L % 2) {
      assert(bagLength % 2);
      int odd = 0;
      for (int i = 0; i < (int)(n); i++)
        if ((v[i] / q) % 2) odd++;
      if (odd != 1) {
        res = 0;
      } else {
        for (int i = 0; i < (int)(n); i++) {
          bag[i] = v[i] / q;
          if (bag[i] % 2) odd = i;
          bag[i] /= 2;
        }
        next = 0;
        output[bagLength / 2] = 'a' + odd;
        for (int j = 0; j < (int)(bagLength / 2); j++) {
          while (bag[next] == 0) next++;
          output[j] = 'a' + next;
          output[bagLength - 1 - j] = 'a' + next;
          bag[next]--;
        }
        for (int i = (1); i < (int)(q); i++)
          for (int j = 0; j < (int)(bagLength); j++)
            output[bagLength * i + j] = output[j];
        res = q;
      }
    } else {
      if (q % 2)
        res = 0;
      else {
        res = 2 * ((L / 2) / bagLength);
        for (int i = (L / 2); i < (int)(L); i++)
          output[i] = output[L / 2 - 1 - (i - L / 2)];
      }
    }
    printf("%d\n%s\n", res, output);
  }
  if (_sc) return 0;
  return 0;
}
