#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  int n;
  cin >> n;
  vector<int> p;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    p.push_back(x);
  }
  int m = p[0];
  for (int i = 0; i < n; i++) {
    m = gcd(m, p[i]);
  }
  int odd = 0;
  for (int i = 0; i < n; i++) {
    odd += (p[i] % 2);
  }
  if (odd > 1) {
    cout << 0 << endl;
    for (int i = 0; i < n; i++) {
      while (p[i]--) {
        cout << (char)('a' + i);
      }
    }
    cout << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    p[i] /= m;
  }
  if (odd == 1) {
    cout << m << endl;
    int pos = 0;
    while (p[pos] % 2 == 0) pos++;
    while (m--) {
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < p[i] / 2; j++) {
          cout << (char)('a' + i);
        }
      }
      cout << (char)('a' + pos);
      for (int i = n - 1; i >= 0; i--) {
        for (int j = 0; j < p[i] / 2; j++) {
          cout << (char)('a' + i);
        }
      }
    }
    cout << endl;
    return 0;
  }
  cout << m << endl;
  while (m) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < p[i]; j++) {
        cout << (char)('a' + i);
      }
    }
    for (int i = n - 1; i >= 0; i--) {
      for (int j = 0; j < p[i]; j++) {
        cout << (char)('a' + i);
      }
    }
    m -= 2;
  }
  cout << endl;
  return 0;
}
