#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 26;
int n;
int cnt[MAXN];
void run() {
  scanf("%d", &n);
  for (int i = (0); i < (n); ++i) scanf("%d", &cnt[i]);
  int g = cnt[0];
  for (int i = (1); i < (n); ++i) g = gcd(g, cnt[i]);
  int nodd = 0, oddidx = -1;
  for (int i = (0); i < (n); ++i)
    if (cnt[i] % 2 == 1) ++nodd, oddidx = i;
  if (nodd == 0) {
    printf("%d\n", g);
    for (int i = (0); i < (g); ++i) {
      if (i % 2 == 0)
        for (int j = (0); j < (n); ++j)
          for (int k = (0); k < (cnt[j] / g); ++k) printf("%c", 'a' + j);
      if (i % 2 == 1)
        for (int j = n - 1; j >= 0; --j)
          for (int k = (0); k < (cnt[j] / g); ++k) printf("%c", 'a' + j);
    }
    puts("");
  } else if (nodd == 1) {
    printf("%d\n", g);
    for (int i = (0); i < (g); ++i) {
      for (int j = (0); j < (n); ++j)
        for (int k = (0); k < (cnt[j] / g / 2); ++k) printf("%c", 'a' + j);
      printf("%c", 'a' + oddidx);
      for (int j = n - 1; j >= 0; --j)
        for (int k = (0); k < (cnt[j] / g / 2); ++k) printf("%c", 'a' + j);
    }
    puts("");
  } else {
    printf("%d\n", 0);
    for (int j = (0); j < (n); ++j)
      for (int k = (0); k < (cnt[j]); ++k) printf("%c", 'a' + j);
    puts("");
  }
}
int main() {
  run();
  return 0;
}
