#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
template <typename T>
inline bool chkmin(T &a, T b) {
  return a > b ? a = b, true : false;
}
template <typename T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, true : false;
}
const int maxN = 1e5 + 5;
int s[maxN], c[30], N;
int Ans[maxN];
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int main() {
  scanf("%d", &N);
  int CntOdd = 0, OddId = 0;
  int Gcd = 0, M = 0;
  for (int i = (1), _end = (N); i <= _end; ++i) {
    scanf("%d", &c[i]);
    if (c[i] & 1) {
      CntOdd++;
      OddId = i;
    }
    Gcd = gcd(c[i], Gcd);
    M += c[i];
  }
  if (CntOdd > 1) {
    puts("0");
    for (int i = (1), _end = (N); i <= _end; ++i)
      for (int j = (1), _end = (c[i]); j <= _end; ++j)
        printf("%c", i + 'a' - 1);
    putchar('\n');
  } else {
    int cnt = 0;
    printf("%d\n", Gcd);
    M /= Gcd;
    for (int i = (1), _end = (N); i <= _end; ++i) c[i] /= Gcd;
    if (OddId != 0) {
      Ans[M / 2 + 1] = OddId;
      c[OddId]--;
      for (int i = (1), _end = (N); i <= _end; ++i)
        for (int j = (1), _end = (c[i] >> 1); j <= _end; ++j) Ans[++cnt] = i;
      for (int i = (1), _end = (M / 2); i <= _end; ++i) Ans[M - i + 1] = Ans[i];
    } else {
      for (int i = (1), _end = (N); i <= _end; ++i)
        for (int j = (1), _end = (c[i]); j <= _end; ++j) Ans[++cnt] = i;
    }
    for (int i = (1), _end = (Gcd); i <= _end; ++i) {
      if (i & 1)
        for (int j = (1), _end = (M); j <= _end; ++j)
          printf("%c", Ans[j] + 'a' - 1);
      else
        for (int j = (M), _end = (1); j >= _end; --j)
          printf("%c", Ans[j] + 'a' - 1);
    }
  }
  return 0;
}
