#include <bits/stdc++.h>
using namespace std;
const int N = 30, M = 100100;
int i, j, k, n, m, g, nm, t;
int a[N];
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  scanf("%d", &n);
  g = 0;
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    g = gcd(a[i], g);
  }
  if (g & 1) {
    nm = 0;
    for (i = 1; i <= n; i++)
      if ((a[i] /= g) & 1) nm++, t = i;
    if (nm > 1) {
      puts("0");
      for (i = 1; i <= n; i++)
        for (j = 1; j <= a[i] * g; j++) putchar('a' + i - 1);
      puts("");
    } else {
      printf("%d\n", g);
      for (i = 1; i <= g; i++) {
        for (j = 1; j <= n; j++)
          if (j != t)
            for (k = 1; k <= a[j] / 2; k++) putchar('a' + j - 1);
        for (k = 1; k <= a[t]; k++) putchar('a' + t - 1);
        for (j = n; j; j--)
          if (j != t)
            for (k = 1; k <= a[j] / 2; k++) putchar('a' + j - 1);
      }
    }
  } else {
    printf("%d\n", g);
    for (i = 1; i <= n; i++) a[i] /= g;
    for (i = 1; i <= g / 2; i++) {
      for (j = 1; j <= n; j++)
        for (k = 1; k <= a[j]; k++) putchar('a' + j - 1);
      for (j = n; j; j--)
        for (k = 1; k <= a[j]; k++) putchar('a' + j - 1);
    }
    puts("");
  }
}
