#include <bits/stdc++.h>
using namespace std;
char ch(int i) { return (char)i + 'a' - 1; }
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int main() {
  int n, a[30], x = 0, y = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 1) x++, y = i;
  }
  if (x >= 2) {
    cout << 0 << endl;
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= a[i]; j++) cout << ch(i);
    return 0;
  }
  if (x == 1) {
    int z = a[1];
    for (int i = 2; i <= n; i++) z = gcd(z, a[i]);
    cout << z << endl;
    for (int i = 1; i <= z; i++) {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= a[i] / z / 2; j++) cout << ch(i);
      }
      cout << ch(y);
      for (int i = n; i >= 1; i--) {
        for (int j = 1; j <= a[i] / z / 2; j++) cout << ch(i);
      }
    }
  }
  if (x == 0) {
    int z = a[1];
    for (int i = 2; i <= n; i++) z = gcd(z, a[i]);
    cout << z << endl;
    for (int i = 1; i <= z / 2; i++) {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= a[i] / z; j++) cout << ch(i);
      }
      for (int i = n; i >= 1; i--) {
        for (int j = 1; j <= a[i] / z; j++) cout << ch(i);
      }
    }
  }
  return 0;
}
