#include <bits/stdc++.h>
using namespace std;
const int nmax = 100010;
int n, sum, a[nmax], block[nmax], cntodd, whichodd, g;
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  scanf("%i", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%i", &a[i]);
    sum += a[i];
    if (a[i] % 2) cntodd++, whichodd = i;
    g = gcd(g, a[i]);
  }
  if (cntodd > 1) {
    printf("0\n");
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= a[i]; ++j) printf("%c", 'a' + i - 1);
    return 0;
  }
  printf("%i\n", g);
  if (cntodd == 0) {
    int ind = 0;
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= a[i] / g; ++j) block[++ind] = 'a' + i - 1;
    for (int i = 1; i <= g; ++i)
      if (i % 2 == 1)
        for (int j = 1; j <= ind; ++j) printf("%c", block[j]);
      else
        for (int j = ind; j >= 1; --j) printf("%c", block[j]);
  } else {
    int ind = 0;
    for (int i = 1; i <= n; ++i)
      if (a[i] % 2 == 0)
        for (int j = 1; j <= a[i] / (2 * g); ++j)
          block[++ind] = 'a' + i - 1, block[sum / g - ind + 1] = 'a' + i - 1;
    while ((++ind) <= sum / g - ind + 1) {
      block[ind] = whichodd - 1 + 'a';
      block[sum / g - ind + 1] = whichodd - 1 + 'a';
    }
    for (int i = 1; i <= g; ++i)
      for (int j = 1; j <= sum / g; ++j) printf("%c", block[j]);
  }
}
