#include <bits/stdc++.h>
using namespace std;
int a[27];
char c[27];
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), c[i] = 'a' + i - 1;
  int g = a[1];
  for (int i = 1; i <= n; i++) g = gcd(g, a[i]);
  int cnt = 0, f = 0, sum = 0;
  bool ok = 1;
  for (int i = 1; i <= n; i++) {
    sum += a[i];
    cnt += (a[i] & 1);
    if (a[i] & 1) f = i;
    if (a[i] != a[1]) ok = 0;
  }
  if (f) {
    swap(c[f], c[n]);
    swap(a[f], a[n]);
  }
  if (n == 1) {
    printf("%d\n", a[1]);
    for (int i = 1; i <= a[1]; i++) putchar(c[1]);
    return 0;
  } else if (cnt > 1) {
    puts("0");
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= a[i]; j++) putchar(c[i]);
    return 0;
  } else if (!cnt) {
    printf("%d\n", g);
    for (int i = 1; i <= g / 2; i++) {
      for (int j = 1; j <= n; j++)
        for (int k = 1; k <= a[j] / g; k++) putchar(c[j]);
      for (int j = n; j >= 1; j--)
        for (int k = 1; k <= a[j] / g; k++) putchar(c[j]);
    }
  } else {
    printf("%d\n", g);
    for (int i = 1; i <= g; i++) {
      for (int j = 1; j < n; j++)
        for (int k = 1; k <= a[j] / g / 2; k++) putchar(c[j]);
      for (int j = 1; j <= a[n] / g; j++) putchar(c[n]);
      for (int j = n - 1; j; j--)
        for (int k = 1; k <= a[j] / g / 2; k++) putchar(c[j]);
    }
  }
  return 0;
}
