#include <bits/stdc++.h>
using namespace std;
int fac, n, len, num[10010], A[10010], Ans = 0;
char s[5000010];
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
void print() {
  for (int i = 1; i <= n; i++) len += num[i];
  if (len % 2 == 1)
    printf("%d\n", fac);
  else
    printf("%d\n", 2 * fac);
  for (int i = 1; i <= fac; i++) {
    int head = 0, tail = len + 1;
    for (int j = 1; j <= n; j++) {
      for (int k = 1; k <= num[j]; k++) {
        if (num[j] % 2 == 1 && k == num[j])
          s[len / 2 + 1] = char('a' + (j - 1));
        else if (k % 2 == 1)
          s[++head] = char('a' + (j - 1));
        else if (k % 2 == 0)
          s[--tail] = char('a' + (j - 1));
      }
    }
    for (int i = 1; i <= len; i++) printf("%c", s[i]);
  }
  exit(0);
}
void print_3rd() {
  fac /= 2;
  for (int i = 1; i <= n; i++) num[i] *= 2;
  print();
}
void print_4th() {
  printf("0\n");
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= A[i]; j++) {
      printf("%c", char('a' + (i - 1)));
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &A[i]);
  fac = A[1];
  for (int i = 2; i <= n; i++) fac = gcd(A[i], fac);
  for (int i = 1; i <= n; i++) num[i] = A[i] / fac;
  for (int i = 1; i <= n; i++) {
    if (num[i] % 2 == 1) {
      Ans++;
    }
  }
  if (Ans == 0) print();
  if (Ans == 1) print();
  if (Ans >= 2 && fac % 2 == 0) print_3rd();
  if (Ans >= 2 && fac % 2 == 1) print_4th();
  return 0;
}
