#include <bits/stdc++.h>
using namespace std;
int n, L = 0, spo = 0, spe = 0, ans = 0;
int a[32];
char s[131072];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", a + i), L += a[i];
  for (int i = 1; i <= L; ++i)
    if (L % i == 0) {
      bool flag = true;
      int co = 0;
      for (int j = 0; j < n; ++j) {
        if (a[j] % i != 0) {
          flag = false;
          break;
        }
        if ((a[j] / i) % 2 == 1) co++;
      }
      if (!flag) continue;
      if (co == 0) spe = i;
      if (co == 1) spo = i;
    }
  int l = 0, r;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < a[i]; ++j) s[l++] = 'a' + i;
  }
  if (spo > 0) {
    char ch = ' ';
    ans = spo;
    l = 0;
    r = L / spo - 1;
    for (int i = 0; i < n; ++i) {
      if ((a[i] / spo) % 2 == 1) {
        ch = 'a' + i;
        a[i]--;
      }
      for (int j = 0; j * 2 < a[i] / spo; ++j) {
        s[l++] = 'a' + i;
        s[r--] = 'a' + i;
      }
    }
    s[l] = ch;
    int tl = L / spo;
    for (int i = tl; i < L; ++i) s[i] = s[i - tl];
  }
  if (spe > 0 && spe * 2 > ans) {
    ans = 2 * spe;
    l = 0;
    r = L / spe - 1;
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j * 2 < a[i] / spe; ++j) {
        s[l++] = 'a' + i;
        s[r--] = 'a' + i;
      }
    }
    int tl = L / spe;
    for (int i = tl; i < L; ++i) s[i] = s[i - tl];
  }
  printf("%d\n", ans);
  puts(s);
  return 0;
}
