#include <bits/stdc++.h>
using namespace std;
const int maxn = 36, maxm = 100010;
int n, cnt = 0, p = 0;
int a[maxn];
int Gcd(int x, int y) { return (y) ? (Gcd(y, x % y)) : (x); }
int k = 0;
char s[maxm];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    if (a[i] % 2) {
      ++cnt;
      p = i;
    }
  }
  if (cnt > 1) {
    puts("0");
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= a[i]; ++j) putchar(i + 96);
    return 0;
  }
  if (p) {
    int g = a[p];
    for (int i = 1; i <= n; ++i)
      if (i != p) g = Gcd(a[i] / 2, g);
    printf("%d\n", g);
    for (int k = 1; k <= g; ++k) {
      for (int i = 1; i <= a[p] / g; ++i) putchar(p + 96);
      for (int i = 1; i <= n; ++i)
        if (i != p && a[i] / 2 / g) {
          for (int j = 1; j <= a[i] / 2 / g; ++j) putchar(i + 96);
        }
      for (int i = n; i; --i)
        if (i != p && a[i] / 2 / g) {
          for (int j = 1; j <= a[i] / 2 / g; ++j) putchar(i + 96);
        }
    }
    return 0;
  }
  int g = 0;
  for (int i = 1; i <= n; ++i) g = Gcd(a[i], g);
  printf("%d\n", g);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= a[i] / g; ++j) s[++k] = i + 96;
  for (int i = 1; i <= g; ++i)
    if (i % 2) {
      for (int j = 1; j <= k; ++j) putchar(s[j]);
    } else {
      for (int j = k; j; --j) putchar(s[j]);
    }
  return 0;
}
