#include <bits/stdc++.h>
const long long N = 30, mod = 1000000007;
using namespace std;
long long n, m, i, j, k, l, r, t, ans, a[N];
vector<long long> v;
string s;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin >> n;
  m = 0;
  l = -1;
  for (i = 0; i < n; ++i) {
    cin >> a[i];
    k += a[i] % 2;
    if (a[i] % 2) l = i;
    if (!m)
      m = a[i];
    else
      m = gcd(m, a[i]);
  }
  if (k > 1) {
    cout << "0\n";
    for (i = 0; i < n; ++i) {
      for (j = 0; j < a[i]; ++j) {
        cout << char('a' + i);
      }
    }
    cout << endl;
    return 0;
  }
  cout << m << endl;
  if (l != -1) {
    m *= 2;
  }
  for (i = 0; i < m; ++i) {
    if (l != -1 && i % 2)
      for (k = 0; k < a[l] * 2 / m; ++k) cout << char('a' + l);
    if (i % 2) {
      for (j = 0; j < n; ++j) {
        if (a[j] % 2 == 1) continue;
        for (k = 0; k < a[j] / m; ++k) cout << char('a' + j);
      }
    } else {
      for (j = n - 1; j >= 0; --j) {
        if (a[j] % 2 == 1) continue;
        for (k = 0; k < a[j] / m; ++k) cout << char('a' + j);
      }
    }
  }
  return 0;
}
