#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1E9;
int N, M, a[26];
char ans[100005];
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int main() {
  cin >> N;
  int LEN = 0, odd = 0, oddi, cnthas = 0, hasi;
  for (int i = (0); i < (N); i++) {
    scanf("%d", a + i);
    LEN += a[i];
    if (a[i] > 0) {
      hasi = i;
      cnthas++;
    }
    if (a[i] % 2) {
      oddi = i;
      odd++;
    }
  }
  if (odd >= 2) {
    puts("0");
    for (int i = (0); i < (N); i++)
      while (a[i]--) ans[M++] = 'a' + i;
  } else {
    int g = -1;
    for (int i = (0); i < (N); i++) {
      if (a[i] > 0) {
        if (g == -1)
          g = a[i];
        else
          g = gcd(g, a[i]);
      }
    }
    if (g % 2) {
      vector<pair<int, int> > as;
      for (int i = (0); i < (N); i++) {
        if (a[i] > 0) {
          int cnt = a[i] / g;
          if (i == oddi) cnt--;
          if (cnt > 0) {
            as.push_back(pair<int, int>(i, cnt));
          }
        }
      }
      printf("%d\n", g);
      int sz = as.size(), G = LEN / g;
      while (g--) {
        ans[M + G / 2] = 'a' + oddi;
        int S = M;
        for (int i = (0); i < (sz); i++) {
          int t = as[i].second, c = as[i].first;
          while (t) {
            t -= 2;
            ans[M] = ans[S + G - (M - S) - 1] = 'a' + c;
            M++;
          }
        }
        M = S + G;
      }
    } else {
      printf("%d\n", g);
      vector<pair<int, int> > as;
      for (int i = (0); i < (N); i++) {
        if (a[i] > 0) {
          as.push_back(pair<int, int>(i, a[i] / g));
        }
      }
      int sz = as.size(), G = LEN / g;
      while (g--) {
        for (int i = (0); i < (sz); i++) {
          int t = as[i].second, c = as[i].first;
          while (t--) ans[M++] = 'a' + c;
        }
        if (g % 2) reverse(ans + M - G, ans + M);
      }
    }
  }
  ans[LEN] = 0;
  printf("%s\n", ans);
  return 0;
}
