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