#include <bits/stdc++.h>
const int maxn = 30;
const int maxm = 1E5 + 3;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int N, A[maxn], sum = 0, ans[maxm];
void printAns(int v) {
  printf("%d\n", v);
  for (int i = 0; i < sum; ++i) putchar('a' + ans[i]);
  puts("");
  exit(0);
}
void no_solution() {
  int cans = 0;
  for (int i = 0; i < N; ++i)
    for (int j = 0; j < A[i]; ++j) ans[cans++] = i;
  printAns(0);
}
void solveOdd() {
  int oddx, cntodd = 0;
  for (int i = 0; i < N; ++i)
    if (A[i] & 1) {
      ++cntodd;
      oddx = i;
    }
  if (cntodd > 1) {
    no_solution();
    return;
  }
  cntodd = A[oddx];
  for (int i = 0; i < N; ++i) cntodd = gcd(cntodd, A[i]);
  for (int i = 0; i < N; ++i) A[i] /= cntodd, A[i] >>= 1;
  int cans = 0;
  for (int g = 0; g < cntodd; ++g) {
    for (int i = 0; i < N; ++i)
      for (int j = 0; j < A[i]; ++j) ans[cans++] = i;
    for (int i = N - 1; i >= 0; --i)
      for (int j = 0; j < A[i]; ++j) ans[cans++] = i;
    ans[cans++] = oddx;
  }
  printAns(cntodd);
}
void solveEven() {
  int d = 0;
  for (int i = 0; i < N; ++i) {
    d = gcd(A[i], d);
    if (A[i] & 1) {
      no_solution();
      return;
    }
  }
  for (int i = 0; i < N; ++i) A[i] /= d;
  bool dir = true;
  int cans = 0;
  for (int g = 0; g < d; ++g) {
    if (dir) {
      for (int i = 0; i < N; ++i)
        for (int j = 0; j < A[i]; ++j) ans[cans++] = i;
    } else {
      for (int i = N - 1; i >= 0; --i)
        for (int j = 0; j < A[i]; ++j) ans[cans++] = i;
    }
    dir = !dir;
  }
  printAns(d);
}
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; ++i) scanf("%d", A + i), sum += A[i];
  if (sum & 1)
    solveOdd();
  else
    solveEven();
}
