#include <bits/stdc++.h>
using namespace std;
inline int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int a[2020];
int main() {
  int n;
  cin >> n;
  int p, cnt = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] & 1) cnt++, p = i;
  }
  if (cnt > 1) {
    puts("0");
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= a[i]; j++) putchar('a' + i - 1);
    }
    return 0;
  }
  int g = a[1];
  for (int i = 2; i <= n; i++) g = gcd(g, a[i]);
  printf("%d\n", g);
  if (cnt) {
    for (int i = 1; i <= g; i++) {
      for (int j = 1; j <= n; j++) {
        if (j == p) {
          continue;
        }
        for (int k = 1; k <= a[j] / g / 2; k++) putchar('a' + j - 1);
      }
      for (int k = 1; k <= a[p] / g; k++) putchar('a' + p - 1);
      for (int j = n; j; j--) {
        if (j == p) {
          continue;
        }
        for (int k = 1; k <= a[j] / g / 2; k++) putchar('a' + j - 1);
      }
    }
  } else {
    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('a' + j - 1);
      }
      for (int j = n; j; j--) {
        for (int k = 1; k <= a[j] / g; k++) putchar('a' + j - 1);
      }
    }
  }
  return 0;
}
