#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void Read(T &x) {
  int f = 1;
  char t = getchar();
  while (t < '0' || t > '9') {
    if (t == '-') f = -1;
    t = getchar();
  }
  x = 0;
  while (t >= '0' && t <= '9') {
    x = x * 10 + t - '0';
    t = getchar();
  }
  x *= f;
}
template <class T>
inline void chkmin(T &x, T y) {
  if (x > y) x = y;
}
template <class T>
inline void chkmax(T &x, T y) {
  if (x < y) x = y;
}
const int maxn = 27;
int n;
int sum;
int a[maxn];
int b[maxn];
void input() {
  Read(n);
  for (int i = 1; i <= n; i++) {
    Read(a[i]);
    sum += a[i];
  }
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void nosolution() {
  printf("0\n");
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= a[i]; j++) {
      putchar('a' + i - 1);
    }
  }
  printf("\n");
}
void solve() {
  int ans = a[1];
  int cnt = 0;
  for (int i = 2; i <= n; i++) ans = gcd(ans, a[i]);
  for (int i = 1; i <= n; i++) {
    if (a[i] & 1) {
      cnt++;
    }
  }
  if (cnt > 1) {
    nosolution();
    return;
  }
  if (ans & 1) {
    int oddc = 0;
    for (int i = 1; i <= n; i++) {
      b[i] = a[i] / ans;
      oddc += (b[i] & 1);
    }
    if (oddc >= 2) {
      nosolution();
      return;
    } else {
      string res;
      int len = sum / ans;
      int l = len / 2 - 1;
      int r = len / 2 + 1;
      res.resize(len);
      printf("%d\n", ans);
      for (int i = 1; i <= n; i++) {
        if (b[i] & 1) {
          res[len / 2] = 'a' + i - 1;
          b[i]--;
        }
      }
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= b[i]; j += 2) {
          res[l--] = 'a' + i - 1;
          res[r++] = 'a' + i - 1;
        }
      }
      for (int i = 1; i <= ans; i++) {
        cout << res;
      }
      cout << endl;
    }
  } else {
    string res;
    string resr;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= a[i] / ans; j++) {
        res.push_back('a' + i - 1);
      }
    }
    resr = res;
    reverse(resr.begin(), resr.end());
    printf("%d\n", ans);
    for (int i = 1; i <= ans; i++) {
      if (i & 1)
        cout << res;
      else
        cout << resr;
    }
    printf("\n");
  }
}
int main() {
  input();
  solve();
  return 0;
}
