#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int N, odd, eve;
int c[27];
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) {
    scanf("%d", c + i);
    odd += c[i] & 1;
    eve += !(c[i] & 1);
  }
  int G = c[1];
  for (int i = 2; i <= N; ++i) {
    G = gcd(G, c[i]);
  }
  if (N == 1) {
    printf("%d\n", c[1]);
    while (c[N]--) putchar('a');
  } else {
    if (odd) {
      if (odd > 1) {
        puts("0");
        for (int i = 1; i <= N; ++i) {
          while (c[i]--) putchar('a' + i - 1);
        }
      } else {
        printf("%d\n", G);
        for (int i = 1; i <= G; ++i) {
          for (int j = 1; j <= N; ++j)
            if ((c[j] & 1) == 0)
              for (int k = 1; k <= c[j] / G / 2; ++k) putchar('a' + j - 1);
          for (int j = 1; j <= N; ++j) {
            if (c[j] & 1) {
              for (int k = 1; k <= c[j] / G; ++k) {
                putchar('a' + j - 1);
              }
              break;
            }
          }
          for (int j = N; j >= 1; --j)
            if ((c[j] & 1) == 0)
              for (int k = 1; k <= c[j] / G / 2; ++k) putchar('a' + j - 1);
        }
      }
    } else {
      printf("%d\n", G);
      for (int i = 1; i <= G / 2; ++i) {
        for (int j = 1; j <= N; ++j)
          for (int k = 1; k <= c[j] / G; ++k) putchar('a' + j - 1);
        for (int j = N; j >= 1; --j)
          for (int k = 1; k <= c[j] / G; ++k) putchar('a' + j - 1);
      }
    }
  }
  return 0;
}
