#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int a[27];
char str[100010];
int main() {
  int n, cnt = 0, id, sum = 0;
  int ans;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
    if (i == 1)
      ans = a[i];
    else
      ans = gcd(ans, a[i]);
    if (a[i] & 1) {
      id = i;
      cnt++;
    }
  }
  if (cnt >= 2) {
    printf("0\n");
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= a[i]; j++) printf("%c", i + 'a' - 1);
    }
  } else {
    printf("%d\n", ans);
    if (cnt == 1) {
      int l = 0, len = (sum - ans) / ans, num;
      for (int i = 1; i <= n; i++) {
        if (i == id)
          num = (a[i] - ans) / ans;
        else
          num = a[i] / ans;
        for (int j = 1; j <= num / 2; j++) {
          str[l] = i + 'a' - 1;
          str[len - l - 1] = str[l];
          l++;
        }
      }
      for (int k = 1; k <= ans; k++) {
        printf("%c", id + 'a' - 1);
        for (int j = 0; j < len; j++) printf("%c", str[j]);
      }
    } else {
      int l = 0;
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= a[i] / ans; j++) str[l++] = i + 'a' - 1;
      }
      for (int k = 1; k <= ans; k++) {
        if (k & 1)
          for (int j = 0; j < l; j++) printf("%c", str[j]);
        else
          for (int j = l - 1; j >= 0; j--) printf("%c", str[j]);
      }
    }
  }
  return 0;
}
