#include <bits/stdc++.h>
using namespace std;
long long n, ans, in, b[200], a[200], second;
string st, ss;
void solve(long long x) {
  long long raod = 0, ind = -1;
  for (int i = 1; i <= n; i++) {
    if (a[i] % x) return;
    b[i] = a[i] / x;
    if (b[i] % 2) raod++, ind = i;
  }
  if (x % 2 == 1) {
    if (raod != 1) return;
    if (x > ans) {
      ans = x;
      in = x;
    }
  } else {
    if (x > ans) {
      ans = x;
      in = x;
    }
  }
}
void calc(long long x) {
  long long raod = 0, ind = -1;
  for (int i = 1; i <= n; i++) {
    if (a[i] % x) return;
    b[i] = a[i] / x;
    if (b[i] % 2) raod++, ind = i;
  }
  if (x % 2 == 1) {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= b[i] / 2; j++) st += char('a' + i - 1);
    ss = st;
    reverse(st.begin(), st.end());
    ss += char('a' + ind - 1);
    ss = ss + st;
    cout << x << endl;
    for (int i = 1; i <= x; i++) cout << ss;
    exit(0);
  } else {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= a[i] / x; j++) st += char('a' + i - 1);
    ss = st;
    reverse(st.begin(), st.end());
    cout << x << endl;
    for (int i = 1; i <= x; i++)
      if (i & 1)
        cout << ss;
      else
        cout << st;
    exit(0);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    second += a[i];
  }
  for (int i = 1; i <= sqrt(second); i++) {
    solve(i);
    solve(second / i);
  }
  if (ans == 0) {
    cout << "0\n";
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= a[i]; j++) cout << char('a' + i - 1);
    }
    return 0;
  }
  calc(in);
  return 0;
}
