#include <bits/stdc++.h>
using namespace std;
int a[27], n, sum = 0;
int gcd(int A, int B) {
  if (B == 0)
    return A;
  else
    return gcd(B, A % B);
}
int b[27];
void output(int t, int l, int r) {
  int tmp = ((l < r) ? 1 : -1);
  for (int j = l; j != r + tmp; j += tmp)
    for (int ij = 1; ij <= b[j] / t; ij++) printf("%c", j + 'a' - 1);
}
bool find(int k) {
  int cntodd = 0;
  for (int i = 1; i <= n; i++) {
    b[i] = a[i] / k;
    if (b[i] & 1) cntodd++;
  }
  int x = sum / k;
  if (k % 2 == 0) {
    cout << k << endl;
    for (int i = 1; i <= k; i++) {
      if (i & 1)
        output(1, 1, n);
      else
        output(1, n, 1);
    }
    return true;
  }
  if (x % 2 == 0) {
    if (cntodd == 0) {
      cout << k << endl;
      for (int i = 1; i <= k; i++) {
        output(2, 1, n);
        output(2, n, 1);
      }
      return true;
    }
    return false;
  } else {
    if (cntodd != 1) return false;
    cout << k << endl;
    int ti = 0, tv = 0;
    for (int i = 1; i <= n; i++)
      if (b[i] & 1) {
        ti = i;
        tv = b[i];
        b[i] = 0;
      }
    for (int i = 1; i <= k; i++) {
      output(2, 1, n);
      for (int j = 1; j <= tv; j++) printf("%c", ti + 'a' - 1);
      output(2, n, 1);
    }
    return true;
  }
}
int main() {
  cin >> n;
  int k = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (k == 0)
      k = a[i];
    else
      k = gcd(k, a[i]);
    sum += a[i];
  }
  for (int i = k; i >= 1; i--)
    if (k % i == 0)
      if (find(i)) return 0;
  cout << '0' << endl;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= a[i]; j++) printf("%c", i + 'a' - 1);
  return 0;
}
