#include <bits/stdc++.h>
using namespace std;
int a[105] = {0};
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int i, j, n, x, y, sum = 0, bh, len;
  string st = "";
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] % 2) {
      sum++;
      bh = i;
    }
  }
  if (n == 1) {
    cout << a[1] << endl;
    while (a[1]--) cout << "a";
    return 0;
  }
  if (sum == 1) {
    if (bh != 1)
      x = gcd(a[1], a[1]);
    else
      x = gcd(a[2], a[2]);
    for (i = 2; i <= n; i++)
      if (bh != i) x = gcd(x, a[i]);
    y = gcd(x, a[bh]);
    cout << y << endl;
    for (i = 1; i <= n; i++)
      for (j = 1; j <= a[i] / y / 2 && i != bh; j++) {
        st += char(i + 'a' - 1);
      }
    len = st.length();
    for (i = 1; i <= y * 2; i++) {
      if (i % 2)
        cout << st;
      else {
        for (j = 1; j <= a[bh] / y; j++) cout << char(bh + 'a' - 1);
        for (j = len - 1; j >= 0; j--) cout << st[j];
      }
    }
    return 0;
  }
  if (sum >= 2) {
    cout << 0 << endl;
    for (i = 1; i <= n; i++)
      for (j = 1; j <= a[i]; j++) cout << char(i + 'a' - 1);
    return 0;
  } else {
    x = gcd(a[1], a[2]);
    for (i = 3; i <= n; i++) x = gcd(x, a[i]);
    if (sum) x = gcd(x, a[bh]);
    cout << x << endl;
    for (i = 1; i <= n; i++)
      for (j = 1; j <= a[i] / x; j++) {
        st += char(i + 'a' - 1);
      }
    len = st.length();
    for (i = 1; i <= x; i++) {
      if (i % 2)
        cout << st;
      else
        for (j = len - 1; j >= 0; j--) cout << st[j];
    }
  }
  return 0;
}
