#include <bits/stdc++.h>
using namespace std;
const int iinf = 1e9 + 7;
const long long linf = 1ll << 60;
const double dinf = 1e10;
void scf(int &x) {
  bool f = 0;
  x = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') {
    f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (f) x = -x;
  return;
}
void scf(int &x, int &y) {
  scf(x);
  return scf(y);
}
void scf(int &x, int &y, int &z) {
  scf(x);
  scf(y);
  return scf(z);
}
const int N = 1e5 + 100;
int C, n, ans, tot;
int par[N], cnt[N];
int a[30];
char out[N];
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline bool check(int cyc) {
  int cnt = 0;
  for (int i = 0; i < C; i++) {
    int d = a[i] / cyc;
    if (d & 1) cnt++;
    if (cnt > 1) return 0;
  }
  return 1;
}
int main() {
  scf(C);
  for (int i = 0; i < C; i++) scf(a[i]), n += a[i];
  int d = a[0];
  for (int i = 1; i <= C - 1; i++) d = gcd(d, a[i]);
  for (int i = 1; i <= d; i++)
    if (d % i == 0 && check(i)) ans = i;
  printf("%d\n", ((n & 1) || (ans << 1) > n) ? ans : ans << 1);
  if (!ans) {
    for (int i = 0; i < C; i++)
      while (a[i]--) putchar((char)('a' + i));
    putchar('\n');
    return 0;
  }
  int rem = -1, len = n / ans;
  for (int i = 0; i < C; i++) {
    a[i] /= ans;
    if (a[i] & 1) rem = i;
  }
  int pos = 0;
  for (int i = 0; i < len >> 1; i++) {
    (a[pos] < 2) && (pos++);
    out[i] = out[len - i - 1] = (char)('a' + pos);
    a[pos] -= 2;
  }
  if (rem != -1) out[len >> 1] = (char)('a' + rem);
  for (int i = 0; i < ans; i++)
    for (int j = 0; j < len; j++) putchar(out[j]);
  putchar('\n');
  return 0;
}
