#include <bits/stdc++.h>
using namespace std;
inline void splay(int &v) {
  v = 0;
  char c = 0;
  int p = 1;
  while (c < '0' || c > '9') {
    if (c == '-') p = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    v = (v << 3) + (v << 1) + c - '0';
    c = getchar();
  }
  v *= p;
}
struct node {
  char s;
  int num;
} a[33];
bool comp(const node &a, const node &b) {
  if (a.num & 1) return 0;
  if (b.num & 1) return 1;
  return a.num < b.num;
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
void tepan() {
  int A = a[1].num, B = a[2].num;
  int k = gcd(A, B);
  if (k == A || k == B) k /= 2;
  A /= k;
  B /= k;
  int ans = 2;
  if (A & 1) ans--;
  if (B & 1) ans--;
  printf("%d\n", k * ans);
  for (int i = 1; i <= k; i++) {
    for (int j = 1; j <= a[1].num / k; j++) {
      putchar(a[1].s);
    }
    for (int j = 1; j <= a[2].num / k; j++) {
      putchar(a[2].s);
    }
  }
}
int main() {
  int n;
  splay(n);
  int sum = 0, tot = 0;
  for (int i = 1; i <= n; i++) {
    splay(a[i].num);
    a[i].s = 'a' + i - 1;
    sum += a[i].num;
  }
  for (int i = n; i >= 1; i--) {
    if (a[i].num & 1) ++tot;
  }
  sort(a + 1, a + n + 1, comp);
  if (n == 1) {
    printf("%d\n", sum);
    for (int j = 1; j <= a[1].num; j++) {
      putchar(a[1].s);
    }
    return 0;
  }
  if (tot >= 2) {
    printf("0\n");
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= a[i].num; j++) {
        putchar(a[i].s);
      }
    }
    return 0;
  }
  if (tot == 1) {
    int k = a[1].num;
    for (int i = 2; i <= n; i++) {
      k = gcd(k, a[i].num);
    }
    printf("%d\n", k);
    for (int T = 1; T <= k; T++) {
      for (int i = 1; i <= n - 1; i++) {
        for (int j = 1; j <= a[i].num / 2 / k; j++) {
          putchar(a[i].s);
        }
      }
      for (int i = 1; i <= a[n].num / k; i++) {
        putchar(a[n].s);
      }
      for (int i = n - 1; i >= 1; i--) {
        for (int j = 1; j <= a[i].num / 2 / k; j++) {
          putchar(a[i].s);
        }
      }
    }
    return 0;
  } else {
    if (n == 2) tepan(), exit(0);
    int k = a[1].num;
    for (int i = 2; i <= n; i++) k = gcd(k, a[i].num);
    printf("%d\n", k);
    for (int i = 1; i <= k / 2; i++) {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= a[i].num / k; j++) {
          putchar(a[i].s);
        }
      }
      for (int i = n; i >= 1; i--) {
        for (int j = 1; j <= a[i].num / k; j++) {
          putchar(a[i].s);
        }
      }
    }
  }
}
