#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long ret = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') ret = ret * 10 + ch - '0', ch = getchar();
  return ret * f;
}
const long long maxn = 30;
long long n;
long long a[maxn];
inline void imp() {
  printf("0\n");
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= a[i]; j++) putchar(i + 'a' - 1);
  }
  printf("\n");
}
inline long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
signed main() {
  n = read();
  bool flg = false, no = false;
  for (long long i = 1; i <= n; i++) {
    a[i] = read();
    if ((a[i] & 1) && flg) no = true;
    if (a[i] & 1) flg = true;
  }
  if (no) {
    imp();
    return 0;
  }
  if (n == 1) {
    printf("%lld\n", a[1]);
    for (long long i = 1; i <= a[1]; i++) putchar('a');
    printf("\n");
    return 0;
  }
  long long g;
  g = a[1];
  for (long long i = 2; i <= n; i++) g = gcd(g, a[i]);
  if (!flg) {
    printf("%lld\n", g);
    string otp1 = "", opt2 = "";
    for (long long i = 1; i <= n; i++) {
      for (long long j = 1; j <= a[i] / g; j++) otp1 += (char)(i + 'a' - 1);
    }
    for (long long i = n; i >= 1; i--) {
      for (long long j = 1; j <= a[i] / g; j++) opt2 += (char)(i + 'a' - 1);
    }
    for (long long i = 1; i <= g; i++)
      if (i & 1)
        cout << otp1;
      else
        cout << opt2;
    printf("\n");
  } else {
    printf("%lld\n", g);
    string opt = "";
    long long mid;
    for (long long i = 1; i <= n; i++)
      if (a[i] & 1) {
        mid = i;
        break;
      }
    for (long long i = 1; i <= n; i++)
      if (i != mid) {
        for (long long j = 1; j <= a[i] / g / 2; j++)
          opt += (char)(i + 'a' - 1);
      }
    for (long long i = 1; i <= a[mid] / g; i++) opt += (char)(mid + 'a' - 1);
    for (long long i = n; i >= 1; i--)
      if (i != mid) {
        for (long long j = 1; j <= a[i] / g / 2; j++)
          opt += (char)(i + 'a' - 1);
      }
    for (long long i = 1; i <= g; i++) cout << opt;
    printf("\n");
  }
  return 0;
}
