#include <bits/stdc++.h>
using namespace std;
const int MN = 100111;
int cnt[33];
int n;
void append(string& s, int i, int t) {
  char c = 'a' + i - 1;
  for (int i = 0, _a = (t); i < _a; ++i) s += c;
}
bool allEvenDivisible(int x) {
  for (int i = (1), _b = (n); i <= _b; ++i)
    if (cnt[i] % 2 == 0 && cnt[i] % x) return false;
  return true;
}
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  while (cin >> n) {
    int nOdd = 0;
    for (int i = (1), _b = (n); i <= _b; ++i) {
      cin >> cnt[i];
      if (cnt[i] % 2) ++nOdd;
    }
    string res = "";
    int best = 0;
    if (nOdd >= 2) {
      for (int i = (1), _b = (n); i <= _b; ++i) {
        append(res, i, cnt[i]);
      }
    } else if (nOdd == 1) {
      int all = 1;
      int x = 0, odd = -1;
      for (int i = (1), _b = (n); i <= _b; ++i)
        if (cnt[i] % 2) {
          x = cnt[i];
          odd = i;
        }
      for (int nGroup = (1), _b = (x); nGroup <= _b; ++nGroup)
        if (x % nGroup == 0) {
          if (allEvenDivisible(nGroup)) {
            best = nGroup;
          }
        }
      for (int turn = (1), _b = (best); turn <= _b; ++turn) {
        for (int i = (1), _b = (n); i <= _b; ++i)
          if (cnt[i] % 2 == 0) append(res, i, cnt[i] / 2 / best);
        for (int i = (n), _b = (1); i >= _b; --i)
          if (cnt[i] % 2 == 0) append(res, i, cnt[i] / 2 / best);
        append(res, odd, x / best);
      }
    } else {
      for (int good = (1), _b = (n); good <= _b; ++good) {
        string cur = "";
        int x = cnt[good];
        int cur_best = 0;
        for (int nGroup = (1), _b = (x); nGroup <= _b; ++nGroup)
          if (x % (nGroup * 2) == 0) {
            bool can = true;
            for (int i = (1), _b = (n); i <= _b; ++i)
              if (i != good) {
                if (cnt[i] % (2 * nGroup)) can = false;
              }
            if (can) cur_best = nGroup;
          }
        if (cur_best > best) {
          best = cur_best;
          res = "";
          for (int turn = (1), _b = (best); turn <= _b; ++turn) {
            for (int i = (1), _b = (n); i <= _b; ++i)
              if (i != good) append(res, i, cnt[i] / 2 / best);
            for (int i = (n), _b = (1); i >= _b; --i)
              if (i != good) append(res, i, cnt[i] / 2 / best);
            append(res, good, x / best);
          }
        }
      }
      best *= 2;
    }
    printf("%d\n", best);
    puts(res.c_str());
  }
}
