#include <bits/stdc++.h>
using namespace std;
int64_t gcd(int64_t a, int64_t b) { return b ? gcd(b, a % b) : a; }
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int64_t n;
  cin >> n;
  int64_t a[n];
  int64_t g = 0;
  for (int64_t i = 0; i < n; i++) cin >> a[i], g = gcd(g, a[i]);
  int64_t ans = 0;
  int64_t palin = 1;
  for (int64_t t = 1; t <= g; t++) {
    if (g % t) continue;
    int64_t b[n];
    int64_t nc = 0;
    for (int64_t i = 0; i < n; i++) b[i] = a[i] / t, nc += b[i] % 2;
    if (nc > 2) continue;
    if (nc == 1 && t > ans)
      ans = t, palin = t;
    else if (nc == 0 && 2 * t > ans)
      ans = 2 * t, palin = t;
  }
  int64_t sum = accumulate(a, a + n, 0);
  cout << ans << "\n";
  if (ans == 0) {
    for (int64_t i = 0; i < n; i++) cout << string(a[i], 'a' + i);
    cout << "\n";
    return 0;
  }
  int64_t b[n];
  for (int64_t i = 0; i < n; i++) b[i] = a[i] / palin;
  int64_t ss = accumulate(b, b + n, 0);
  string ANS(ss, 'a');
  int64_t j = 0;
  for (int64_t i = 0; i < n; i++) {
    if (b[i] % 2 == 1) {
      ANS[ANS.size() / 2] = 'a' + i;
    }
    for (int64_t k = 1; 2 * k <= b[i]; k++) {
      ANS[j] = ANS[ANS.size() - j - 1] = 'a' + i;
      j++;
    }
  }
  string tt = ANS;
  while (tt.size() < sum) tt += ANS;
  cout << tt << endl;
}
