#include <bits/stdc++.h>
using namespace std;
int a[27];
int gcd(int x, int y) {
  int t = x % y;
  if (t == 0) return y;
  x = y;
  y = t;
  return gcd(x, y);
}
int main() {
  int n, m, odd = 0, p = -114514, i, j, k;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    odd += (a[i] & 1);
    if (a[i] & 1) p = i;
  }
  if (n == 1) {
    printf("%d\n", a[1]);
    for (i = 1; i <= a[1]; i++) printf("a");
    return 0;
  }
  if (odd > 1) {
    printf("0\n");
    for (i = 1; i <= n; i++)
      for (j = 1; j <= a[i]; j++) printf("%c", 'a' + i - 1);
  } else {
    int res = a[1];
    for (i = 2; i <= n; i++) res = gcd(res, a[i]);
    printf("%d\n", res);
    if (odd) {
      for (i = 1; i <= res; i++) {
        for (j = 1; j <= n; j++) {
          if (j == p) continue;
          for (k = 1; k <= a[j] / res / 2; k++) printf("%c", 'a' + j - 1);
        }
        for (j = 1; j <= a[p] / res; j++) printf("%c", 'a' + p - 1);
        for (j = n; j >= 1; j--) {
          if (j == p) continue;
          for (k = 1; k <= a[j] / res / 2; k++) printf("%c", 'a' + j - 1);
        }
      }
    } else {
      for (i = 1; i <= res / 2; i++) {
        for (j = 1; j <= n; j++)
          for (k = 1; k <= a[j] / res; k++) printf("%c", 'a' + j - 1);
        for (j = n; j >= 1; j--)
          for (k = 1; k <= a[j] / res; k++) printf("%c", 'a' + j - 1);
      }
    }
  }
  return 0;
}
