#include <bits/stdc++.h>
using namespace std;
long long n, c, x, a[31];
inline long long read() {
  long long sum = 0, x = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') x = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    sum = sum * 10 + ch - '0';
    ch = getchar();
  }
  return sum * x;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
  return;
}
inline long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
signed main() {
  n = read();
  for (register long long i = 1; i <= n; ++i) a[i] = read();
  for (register long long i = 1; i <= n; ++i)
    if (a[i] & 1) {
      ++c;
      x = i;
    }
  if (c > 1) {
    write(0);
    putchar('\n');
    for (register long long i = 1; i <= n; ++i)
      while (a[i]--) putchar('a' - 1 + i);
  } else if (c == 1) {
    c = a[1];
    for (register long long i = 2; i <= n; ++i) c = gcd(c, a[i]);
    write(c);
    putchar('\n');
    for (register long long i = 1; i <= c; ++i) {
      for (register long long j = 1; j <= n; ++j)
        if (j != x)
          for (register long long k = 1; k <= a[j] / c / 2; ++k)
            putchar('a' - 1 + j);
      for (register long long j = 1; j <= a[x] / c; ++j) putchar('a' - 1 + x);
      for (register long long j = n; j > 0; --j)
        if (j != x)
          for (register long long k = 1; k <= a[j] / c / 2; ++k)
            putchar('a' - 1 + j);
    }
  } else {
    c = a[1];
    for (register long long i = 2; i <= n; ++i) c = gcd(c, a[i]);
    write(c);
    putchar('\n');
    for (register long long i = 1; i <= c / 2; ++i) {
      for (register long long j = 1; j <= n; ++j)
        for (register long long k = 1; k <= a[j] / c; ++k) putchar('a' - 1 + j);
      for (register long long j = n; j > 0; --j)
        for (register long long k = 1; k <= a[j] / c; ++k) putchar('a' - 1 + j);
    }
  }
  return 0;
}
