#include <bits/stdc++.h>
using namespace std;
inline int64_t readli() {
  register char c;
  for (c = getchar(); !(c >= '0' && c <= '9'); c = getchar())
    ;
  register int64_t a = c - '0';
  for (c = getchar(); c >= '0' && c <= '9'; c = getchar())
    a = (a << 3) + (a << 1) + c - '0';
  return a;
}
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int a[26];
int main() {
  int n = readli();
  a[0] = readli();
  int g = a[0];
  int sum = a[0];
  int oc = (a[0] & 1);
  for (int i = 1; i < n; i++) {
    a[i] = readli();
    oc += (a[i] & 1);
    g = gcd(g, a[i]);
    sum += a[i];
  }
  if (oc > 1) {
    puts("0");
    for (int i = 0; i < n; i++)
      for (int j = 0; j < a[i]; j++) cout << char('a' + i);
    cout << endl;
    return 0;
  }
  cout << g << endl;
  string s;
  char odc = 0;
  for (int i = 0; i < n; i++) {
    int j = a[i] / ((oc + 1) * g);
    if (a[i] & 1) odc = 'a' + i;
    while (j--) s.push_back('a' + i);
  }
  for (int i = 0; i < (oc ? g : g / 2); i++) {
    cout << s;
    reverse(s.begin(), s.end());
    if (odc) cout << odc;
    cout << s;
    reverse(s.begin(), s.end());
  }
  cout << endl;
  return 0;
}
