#include <bits/stdc++.h>
const int maxn = 26;
int n, o1 = 0, o2 = 0;
int a[maxn], b[maxn], g = -1, o_p, sum = 0;
char s[3000000];
int sp = 0;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
    if (a[i] % 2 == 0)
      o2++;
    else {
      o1++;
      o_p = i;
    }
    if (g == -1)
      g = a[i];
    else
      g = gcd(g, a[i]);
  }
  if (o1 > 1) {
    printf("0\n");
    for (int i = 0; i < n; i++) {
      for (int j = 1; j <= a[i]; j++) printf("%c", 'a' + i);
    }
  } else if (o1 == 1) {
    printf("%d\n", g);
    for (int k = 1; k <= g; k++) {
      for (int i = 0; i < n; i++) {
        if (i != o_p)
          for (int j = 1; j <= a[i] / g / 2; j++) printf("%c", 'a' + i);
      }
      for (int j = 1; j <= a[o_p] / g; j++) printf("%c", 'a' + o_p);
      for (int i = n - 1; i >= 0; i--) {
        if (i != o_p)
          for (int j = 1; j <= a[i] / g / 2; j++) printf("%c", 'a' + i);
      }
    }
  } else {
    printf("%d\n", g);
    for (int k = 1; k <= g / 2; k++) {
      for (int i = 0; i < n; i++) {
        for (int j = 1; j <= a[i] / g; j++) printf("%c", 'a' + i);
      }
      for (int i = n - 1; i >= 0; i--) {
        for (int j = 1; j <= a[i] / g; j++) printf("%c", 'a' + i);
      }
    }
  }
}
