#include <bits/stdc++.h>
using namespace std;
const int N = 99;
int n, m, a[N], x, d[99], k, res;
string s, ans;
string f(int m) {
  string s;
  s.resize(m);
  int k = 0, p, r = 0;
  for (int i = 0; i < n; ++i)
    if (a[i] & 1) {
      ++k;
      p = i;
    }
  if ((!(m & 1) && k) || ((m & 1) && k > 1)) return "";
  if (k) {
    s[m / 2] = char('a' + p);
    --a[p];
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < a[i]; j += 2) {
      s[r] = char('a' + i);
      s[m - r - 1] = char('a' + i);
      ++r;
    }
  if (k) ++a[p];
  return s;
}
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    m += a[i];
    x = gcd(a[i], x);
  }
  for (int i = 2; i <= x; ++i)
    while (x % i == 0) {
      x /= i;
      d[k++] = i;
    }
  for (int mask = 0; mask < (1 << k); ++mask) {
    x = 1;
    for (int j = 0; j < k; ++j)
      if ((mask >> j) & 1) x *= d[j];
    for (int i = 0; i < n; ++i) a[i] /= x;
    s = f(m / x);
    for (int i = 0; i < n; ++i) a[i] *= x;
    if ((m / x) % 2 == 0) x *= 2;
    if (!s.empty() && res < x) {
      res = x;
      ans = s;
    }
  }
  cout << res << "\n";
  if (res > 1 && res % 2 == 0 && (m / (res / 2)) % 2 == 0) res /= 2;
  for (int i = 0; i < res; ++i) cout << ans;
  if (!res)
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < a[i]; ++j) cout << char('a' + i);
  cout << "\n";
  return 0;
}
