#include <bits/stdc++.h>
using namespace std;
int chu[1000005], you[1000005];
int gcd(int a, int b) {
  while (a % b != 0) {
    int k = a % b;
    a = b;
    b = k;
  }
  return b;
}
int main() {
  int n;
  while (~scanf("%d", &n)) {
    string q = "", h = "", jie1 = "", jie2 = "", zhong = "";
    scanf("%d", &you[0]);
    int gong = you[0], xx = 0;
    if (you[0] % 2 == 1) {
      char ru = 'a';
      jie1 += ru;
      jie2 += ru;
      xx++;
      you[0]--;
    }
    for (int i = 1; i < n; i++) {
      scanf("%d", &you[i]);
      gong = gcd(gong, you[i]);
      if (you[i] % 2 == 1) {
        char ru = 'a' + i;
        jie1 += ru;
        jie2 += ru;
        xx++;
        you[i]--;
      }
    }
    for (int i = 0; i < n; i++) {
      chu[i] = you[i] / gong;
      if (chu[i] % 2 == 1) {
        char ru = 'a' + i;
        jie1 = jie1 + ru;
        jie2 = ru + jie2;
      }
      chu[i] /= 2;
    }
    if (n == 1) {
      printf("%d\n", gong);
      for (int i = 0; i < gong; i++) {
        char ru = 'a';
        printf("%c", ru);
      }
      puts("");
      continue;
    }
    if (xx > 1) {
      printf("0\n");
      cout << jie1;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < you[i]; j++) {
          char ru = 'a' + i;
          printf("%c", ru);
        }
      }
      puts("");
      continue;
    }
    for (int i = 0; i < n; i++) {
      string qian = "";
      char ru = 'a' + i;
      while (chu[i]--) qian += ru;
      jie1 = qian + jie1 + qian;
      jie2 = qian + jie2 + qian;
    }
    int shuchu = gong;
    printf("%d\n", shuchu);
    int s = gong / 2 - 1;
    for (int i = 0; i < gong; i++) {
      if (i % 2 == 0)
        cout << jie1;
      else
        cout << jie2;
    }
    puts("");
  }
  return 0;
}
