#include <bits/stdc++.h>
using namespace std;
const int N = 30;
string lx[2];
int c[N];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  scanf("%d", &n);
  int sum = 0, qaq = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &c[i]), sum += c[i];
    if (c[i] & 1) qaq++;
  }
  if (qaq > 1) {
    printf("0\n");
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= c[i]; ++j) printf("%c", char(i + 'a' - 1));
    return 0;
  }
  int gg = c[1];
  for (int i = 2; i <= n; ++i) gg = gcd(max(gg, c[i]), min(gg, c[i]));
  for (int i = 1; i <= n; ++i) c[i] /= gg;
  printf("%d\n", gg);
  lx[0] = "", lx[1] = "";
  string ll = "";
  if (gg & 1) {
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= c[i] / 2; ++j) lx[0] += char(i + 'a' - 1);
    for (int i = 1; i <= n; ++i)
      if (c[i] & 1) lx[0] += char(i + 'a' - 1);
    for (int i = n; i >= 1; --i)
      for (int j = 1; j <= c[i] / 2; ++j) lx[0] += char(i + 'a' - 1);
    int len = lx[0].length();
    for (int i = len - 1; i >= 0; --i) lx[1] += lx[0][i];
    for (int i = 1; i <= gg; ++i) ll += lx[i % 2];
    cout << ll << endl;
  } else {
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= c[i]; ++j) lx[0] += char(i + 'a' - 1);
    int len = lx[0].length();
    for (int i = len - 1; i >= 0; --i) lx[1] += lx[0][i];
    for (int i = 1; i <= gg; ++i) ll += lx[i % 2];
    cout << ll << endl;
  }
  return 0;
}
