#include <bits/stdc++.h>
using namespace std;
const int M = 2e6 + 7;
int read() {
  int ans = 0, f = 1, c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    ans = ans * 10 + (c - '0');
    c = getchar();
  }
  return ans * f;
}
int n, s[27];
int gcd(int x, int y) {
  while (y) {
    int r = x % y;
    x = y;
    y = r;
  }
  return x;
}
int cnt, p = 1, xp;
char c[M];
string xs;
int main() {
  n = read();
  for (int i = 1; i <= n; i++) s[i] = read(), cnt += (s[i] & 1);
  if (n == 1) {
    printf("%d\n", s[1]);
    for (int i = 1; i <= s[1]; i++) printf("%c", 'a');
    puts("");
    return 0;
  }
  if (cnt >= 2) {
    puts("0");
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= s[i]; j++) printf("%c", 'a' + i - 1);
    puts("");
    return 0;
  }
  cnt = 0;
  int ans = gcd(s[1], s[2]);
  for (int i = 3; i <= n; i++) ans = gcd(ans, s[i]);
  for (int i = 1; i <= n; i++) {
    s[i] /= ans;
    if (s[i] & 1) p = i, cnt++;
  }
  int l = 1e6, r = 1e6 + 1, q = 0;
  for (int i = 1; i <= s[p]; i++) c[r++] = 'a' + p - 1;
  for (int i = 1; i <= n; i++)
    if (i != p) {
      for (int j = 1; j <= s[i]; j++, q ^= 1) {
        if (q)
          c[l--] = 'a' + i - 1;
        else
          c[r++] = 'a' + i - 1;
      }
    }
  printf("%d\n", ans);
  for (int i = l + 1; i <= r - 1; i++) xs += c[i];
  if (cnt >= 2) {
    for (int i = r - 1; i >= l + 1; i--) xs += c[i];
    ans /= 2;
  }
  for (int i = 1; i <= ans; i++) cout << xs;
  puts("");
  return 0;
}
