#include <bits/stdc++.h>
using namespace std;
int v[30];
int main() {
  int n;
  scanf("%d", &n);
  int m = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &v[i]);
    m += v[i];
  }
  int ans = 0;
  bool ansOdd = false;
  for (int i = 1; i <= m; i++) {
    bool odd = false;
    bool flag = true;
    for (int j = 0; j < n; j++) {
      if (v[j] % i) {
        flag = false;
        break;
      }
      if ((v[j] / i) & 1) {
        if (odd) {
          flag = false;
          break;
        }
        odd = true;
      }
    }
    if (flag) ans = i, ansOdd = odd;
  }
  printf("%d\n", ans + (!ansOdd) * ans);
  if (ans == 0) {
    for (int i = 0; i < n; i++)
      while (v[i]--) printf("%c", i + 'a');
    printf("\n");
    return 0;
  }
  vector<char> aux(m / ans);
  int sz = m / ans;
  int l = 0, r = sz - 1;
  for (int i = 0; i < n; i++) {
    if (!v[i]) continue;
    int cnt = v[i] / ans;
    if (cnt & 1) {
      cnt--;
      aux[sz / 2] = i + 'a';
    }
    while (cnt) {
      cnt -= 2;
      aux[l++] = i + 'a';
      aux[r--] = i + 'a';
    }
  }
  while (ans--) {
    for (char c : aux) printf("%c", c);
  }
  printf("\n");
  return 0;
}
