#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int a[30];
char s[maxn];
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2) cnt++;
  }
  if (n == 1) {
    cout << a[0] << endl;
    for (int i = 0; i < a[0]; i++) cout << 'a';
    cout << endl;
    return 0;
  }
  if (cnt > 1) {
    cout << 0 << endl;
    for (int i = 0; i < n; i++) {
      for (int t = 0; t < a[i]; t++) cout << (char)('a' + i);
    }
    cout << endl;
    return 0;
  }
  int g = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) g = gcd(g, a[i]);
  cnt = 0;
  int index = -1;
  for (int i = 0; i < n; i++) {
    a[i] /= g;
    if (a[i] % 2) {
      cnt++;
      index = i;
    }
  }
  int l = 1e5, r = 1e5 + 1;
  for (int i = 0; i < a[index]; i++) s[r++] = 'a' + index;
  int flag = 1;
  for (int i = 0; i < n; i++) {
    if (i == index) continue;
    while (a[i] != 0) {
      if (flag) {
        s[l--] = 'a' + i;
        a[i]--;
        flag = 0;
      } else {
        s[r++] = 'a' + i;
        a[i]--;
        flag = 1;
      }
    }
  }
  string ans;
  for (int i = l + 1; i < r; i++) ans += s[i];
  if (cnt > 1) {
    for (int i = r - 1; i > l; i--) ans += s[i];
  }
  cout << g << endl;
  if (cnt > 1) g /= 2;
  for (int i = 0; i < g; i++) cout << ans;
  cout << endl;
  return 0;
}
