#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFF = 0x3f3f;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-8;
const long long mod = (long long)1e9 + 7;
const unsigned long long mx = 133333331;
inline void RI(int &x) {
  char c;
  while ((c = getchar()) < '0' || c > '9')
    ;
  x = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0';
}
struct bead {
  int a, b;
} p[30];
char ans[100005];
bool cmp(bead x, bead y) { return x.a < y.a; }
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int sum = 0;
    int odd = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &p[i].a);
      p[i].b = i;
      sum += p[i].a;
      if (p[i].a % 2) odd++;
    }
    if (odd > 1) {
      printf("0\n");
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < p[i].a; j++) printf("%c", 'a' + i);
      }
      printf("\n");
    } else {
      int ans = p[0].a;
      for (int i = 0; i < n; i++) ans = gcd(ans, p[i].a);
      printf("%d\n", ans);
      string an = "", bn = "";
      int flag = 0;
      if (odd == 1) {
        int t = ans * 2;
        for (int i = 0; i < n; i++) {
          int k = p[i].a / t;
          if (p[i].a & 1) flag = i;
          for (int j = 0; j < k; j++) {
            char c = 'a' + i;
            an = an + c;
            bn = c + bn;
          }
        }
        for (int i = 0; i < ans; i++) cout << an << (char)('a' + flag) << bn;
        cout << endl;
      } else {
        for (int i = 0; i < n; i++) {
          int k = p[i].a / ans;
          for (int j = 0; j < k; j++) {
            char c = 'a' + i;
            an = an + c;
            bn = c + bn;
          }
        }
        for (int i = 0; i < ans / 2; i++) cout << an << bn;
        cout << endl;
      }
    }
  }
  return 0;
}
