#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 4e5 + 10, INF = 0x3f3f3f3f;
int n, cnt, ans, sum;
int a[N];
char buf[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    ans = gcd(ans, a[i]);
    cnt += a[i] & 1;
    sum += a[i];
  }
  if (cnt > 1) {
    puts("0");
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= a[i]; ++j) putchar(i - 1 + 'a');
    return puts(""), 0;
  }
  if (cnt) {
    int len = sum / ans, cur = len / 2 + 1;
    for (int i = 1; i <= n; ++i)
      if (a[i] & 1) {
        buf[cur] = i - 1 + 'a';
        ++cur;
        break;
      }
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= a[i] / ans / 2; ++j)
        buf[cur] = buf[len - cur + 1] = i - 1 + 'a', ++cur;
    printf("%d\n", ans);
    for (int i = 1; i <= ans; ++i)
      for (int j = 1; j <= len; ++j) putchar(buf[j]);
    return puts(""), 0;
  }
  int len = sum / ans * 2, cur = len / 2 + 1;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= a[i] / ans; ++j)
      buf[cur] = buf[len - cur + 1] = i - 1 + 'a', ++cur;
  printf("%d\n", ans);
  for (int i = 1; i <= ans / 2; ++i)
    for (int j = 1; j <= len; ++j) putchar(buf[j]);
  puts("");
}
