#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int ret = 0;
  while (((a | b) & 1) == 0) ret++, a >>= 1, b >>= 1;
  if (a < b) swap(a, b);
  while (b) {
    while ((a & 1) == 0) a >>= 1;
    while ((b & 1) == 0) b >>= 1;
    b = (a - b) >> 1;
    a -= b;
    if (a < b) swap(a, b);
  }
  return a << ret;
}
int a[30];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int g = a[1];
  int cnt = a[1] & 1;
  for (int i = 2; i <= n; i++) {
    g = gcd(g, a[i]);
    cnt += a[i] & 1;
  }
  if (cnt >= 2) {
    printf("0\n");
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= a[i]; j++) printf("%c", i - 1 + 'a');
  } else if (cnt == 1) {
    for (int i = 1; i <= n; i++) a[i] /= g;
    printf("%d\n", g);
    while (g--) {
      for (int i = 1; i <= n; i++)
        for (int j = 1; j <= a[i] / 2; j++) printf("%c", i - 1 + 'a');
      for (int i = 1; i <= n; i++)
        if (a[i] & 1) printf("%c", i - 1 + 'a');
      for (int i = n; i >= 1; i--)
        for (int j = 1; j <= a[i] / 2; j++) printf("%c", i - 1 + 'a');
    }
  } else {
    for (int i = 1; i <= n; i++) a[i] /= g;
    printf("%d\n", g);
    for (int i = 1; i <= g; i++) {
      if (i & 1) {
        for (int j = 1; j <= n; j++)
          for (int k = 1; k <= a[j]; k++) printf("%c", j - 1 + 'a');
      } else {
        for (int j = n; j >= 1; j--)
          for (int k = 1; k <= a[j]; k++) printf("%c", j - 1 + 'a');
      }
    }
  }
  return 0;
}
