#include <bits/stdc++.h>
using namespace std;
bool han(vector<int> &a, int d) {
  int count = 0;
  for (int i = 0; i < a.size(); i++) {
    count += (a[i] / d) % 2;
  }
  return count < 2;
}
int gcd(int a, int b) {
  if (a > b) swap(a, b);
  while (a > 0) {
    b %= a;
    if (b == 0) return a;
    a %= b;
  }
  return b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int g = 0;
  for (int i = 0; i < n; i++) g = gcd(g, a[i]);
  int sum = 0;
  for (int i = 0; i < n; i++) sum += a[i];
  int maxv = 0, maxper = 0;
  for (int i = 1; i <= g; i++) {
    if (g % i != 0) continue;
    if (!han(a, i)) continue;
    int per = sum / i;
    int v = i;
    if (per % 2 == 0) v *= 2;
    if (v > maxv) {
      maxv = v;
      maxper = per;
    }
  }
  if (maxv == 0) {
    cout << 0 << "\n";
    string res;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < a[i]; j++) res.push_back((char)('a' + i));
    }
    cout << res << "\n";
    return 0;
  }
  int div = sum / maxper;
  int kisu = -1;
  string res;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < (a[i] / div / 2); j++) {
      res.push_back((char)('a' + i));
    }
    if ((a[i] / div) % 2) kisu = i;
  }
  string res2 = res;
  reverse(res2.begin(), res2.end());
  if (kisu >= 0) res.push_back((char)('a' + kisu));
  res = res + res2;
  string res3 = res;
  for (int i = 0; i < div - 1; i++) res += res3;
  cout << maxv << "\n";
  cout << res << "\n";
  return 0;
}
