#include <bits/stdc++.h>
using namespace std;
inline int gcd(int a, int b) {
  int t;
  while (b) {
    t = a;
    a = b;
    b = t % b;
  }
  return a;
}
int a[100], n, g, sum = 0, cnt = 0, ans[100010];
void print(int a[], int k, bool fan) {
  int st = 1, ed = k + 1, dir = 1;
  for (int j = k; j <= sum; j += k) {
    for (int i = st; i != ed; i += dir) putchar(a[i] - 1 + 'a');
    if (fan) {
      swap(st, ed);
      st -= dir;
      ed -= dir;
      dir = -dir;
    }
  }
  puts("");
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) {
    scanf("%d", &a[i]);
    g = gcd(g, a[i]);
    if (a[i] & 1) cnt++;
    sum += a[i];
  }
  if (cnt == 0) {
    cout << g << endl;
    int k = sum / g, t = 0;
    for (int i = (1); i <= (n); i++)
      for (int j = (1); j <= (a[i] / g); j++) ans[++t] = i;
    print(ans, k, 1);
  } else if (cnt == 1) {
    cout << g << endl;
    int k = sum / g, t = 0, m;
    for (int i = (1); i <= (n); i++)
      if (a[i] & 1) {
        m = i;
        break;
      }
    for (int i = (1); i <= (n); i++) {
      int b = a[i] / g / 2;
      for (int j = (1); j <= (b); j++) ans[++t] = i;
    }
    ans[++t] = m;
    for (int i = t - 1; i > 0; i--) ans[++t] = ans[i];
    print(ans, k, 0);
  } else {
    puts("0");
    for (int i = (1); i <= (n); i++)
      while (a[i]--) putchar(i - 1 + 'a');
    puts("");
  }
  return 0;
}
