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