#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000000")
using namespace std;
int n, arr[1001];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin >> n;
  int odd = 0, g = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    g = gcd(arr[i], g);
    if (arr[i] & 1) odd++;
  }
  if (odd > 1) {
    cout << 0 << endl;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < arr[i]; j++) cout << char('a' + i);
    return 0;
  }
  if (odd == 1) {
    char center;
    string Left;
    for (int i = 0; i < n; i++) {
      if (arr[i] & 1)
        center = 'a' + i;
      else {
        for (int j = 0; j < arr[i] / g / 2; j++) Left += char('a' + i);
      }
    }
    string ans = Left;
    for (int i = 0; i < arr[center - 'a'] / g; i++) ans += center;
    reverse((Left).begin(), (Left).end());
    ans += Left;
    cout << g << endl;
    for (int i = 0; i < g; i++) cout << ans;
    return 0;
  }
  cout << g << endl;
  string ans;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < arr[i] / g; j++) ans += char('a' + i);
  }
  for (int i = 0; i < g; i++) {
    cout << ans;
    reverse((ans).begin(), (ans).end());
  }
  return 0;
}
