#include <bits/stdc++.h>
using namespace std;
int get_cost(string s) {
  int len = s.length();
  int ans = 0;
  for (int i = 0; i < len; i++) {
    string a = s.substr(0, i);
    string b = s.substr(i, len - i);
    string s1 = b + a;
    string s2 = s1;
    reverse(s2.begin(), s2.end());
    if (s1 == s2) ans++;
  }
  return ans;
}
string rev(string s) {
  reverse(s.begin(), s.end());
  return s;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  scanf("%d", &n);
  vector<int> cnt(n);
  for (int i = 0; i < n; i++) scanf("%d", &cnt[i]);
  int len = 0;
  for (int x : cnt) len += x;
  if (n == 1) {
    printf("%d\n", len);
    printf("%s\n", string(len, 'a').c_str());
    return 0;
  }
  int odd_cnt = 0;
  for (int x : cnt)
    if (x % 2 == 1) odd_cnt++;
  if (odd_cnt > 1) {
    printf("0\n");
    string s;
    for (int i = 0; i < n; i++) s += string(cnt[i], (char)('a' + i));
    printf("%s\n", s.c_str());
    return 0;
  }
  int g = cnt[0];
  for (int i = 1; i < n; i++) g = gcd(g, cnt[i]);
  int gr = g / 2;
  if (odd_cnt == 1) {
    int who_odd = -1;
    int who_even = -1;
    for (int i = 0; i < n; i++) {
      if (cnt[i] % 2 == 1) who_odd = i;
      if (cnt[i] % 2 == 0) who_even = i;
    }
    string a = string(cnt[who_odd] / g, (char)('a' + who_odd));
    string b = string(cnt[who_even] / g, (char)('a' + who_even));
    string other;
    for (int i = 0; i < n; i++) {
      if (i != who_odd && i != who_even)
        other += string(cnt[i] / g / 2, (char)('a' + i));
    }
    a = other + a + rev(other);
    string s;
    for (int i = 0; i < g; i++) {
      s += a + b;
    }
    printf("%d\n", g);
    printf("%s\n", s.c_str());
    return 0;
  }
  string a = string(cnt[0] / gr, 'a');
  string b = string(cnt[1] / gr, 'b');
  string other;
  for (int i = 2; i < n; i++) other += string(cnt[i] / g, (char)('a' + i));
  string rev_other = rev(other);
  string s;
  for (int i = 0; i < gr; i++) {
    s += a + other + b + rev_other;
  }
  printf("%d\n", g);
  printf("%s\n", s.c_str());
  return 0;
}
