#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f, MOD = 1e9 + 7, N = 1e5 + 5;
int mdc(int a, int b) { return b ? mdc(b, a % b) : a; }
int t, n, a[27], m, im;
char s[2][N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    t += a[i];
    if (a[i] % 2) im++;
  }
  if (im > 1) {
    printf("0\n");
    for (int i = 0; i < n; i++)
      for (int j = 0; j < a[i]; j++) printf("%c", i + 'a');
    printf("\n");
    return 0;
  }
  m = a[0];
  for (int i = 1; i < n; i++) m = (m > a[i]) ? mdc(m, a[i]) : mdc(a[i], m);
  t /= m;
  for (int i = 0; i < n; i++) a[i] /= m;
  s[0][t] = s[1][t] = '\0';
  int pos = 0;
  for (int i = 0; i < n; i++) {
    while (a[i] >= 2) {
      s[0][pos] = s[0][t - pos - 1] = i + 'a';
      s[1][pos] = s[1][t - pos - 1] = i + 'a';
      a[i] -= 2;
      pos++;
    }
  }
  for (int i = 0; i < n; i++)
    if (a[i]) s[0][pos] = s[1][t - pos - 1] = i + 'a', pos++;
  printf("%d\n", m);
  for (int i = 0; i < m; i++) {
    printf("%s", s[i % 2]);
  }
  printf("\n");
  return 0;
}
