#include <bits/stdc++.h>
using namespace std;
int n, p, k, i, j, ans, a[30];
string s1, s2;
int gcd(int a, int b) { return a % b == 0 ? b : gcd(b, a % b); }
int main() {
  scanf("%d", &n);
  for (p = 0, i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] % 2) p++, k = i;
  }
  if (p >= 2) {
    printf("0\n");
    for (i = 1; i <= n; i++)
      for (j = 1; j <= a[i]; j++) printf("%c", i + 'a' - 1);
  } else {
    for (ans = a[1], i = 2; i <= n; i++) ans = gcd(ans, a[i]);
    printf("%d\n", ans);
    if (p == 1) {
      for (i = 1; i <= n; i++) a[i] /= ans;
      for (s1 = "", i = 1; i <= a[k]; i++) s1 += char(k + 'a' - 1);
      for (i = 1; i <= n; i++)
        if (i != k)
          for (j = 1; j <= a[i] / 2; j++)
            s1 = char(i + 'a' - 1) + s1 + char(i + 'a' - 1);
      for (i = 1; i <= ans; i++) cout << s1;
      cout << endl;
    } else {
      for (i = 1; i <= n; i++) a[i] /= ans;
      for (s1 = "", s2 = "", i = 1; i <= n; i++)
        for (j = 1; j <= a[i]; j++)
          s1 += char(i + 'a' - 1), s2 = char(i + 'a' - 1) + s2;
      for (i = 1; i <= ans; i++)
        if (i % 2)
          cout << s1;
        else
          cout << s2;
      cout << endl;
    }
  }
  return 0;
}
