#include <bits/stdc++.h>
using namespace std;
int a[30];
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
void vOut(int ch, int num) {
  int i;
  for (i = 1; i <= num; i++) cout << char(ch + 'a' - 1);
}
int main() {
  int i, j, k, n, cnt = 0, tmp;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    cnt += a[i] & 1;
    tmp = ((i == 1) ? a[1] : gcd(tmp, a[i]));
  }
  if (cnt > 1) {
    cout << 0 << endl;
    for (i = 1; i <= n; i++) vOut(i, a[i]);
  } else {
    cout << tmp << endl;
    if (cnt == 0) {
      for (i = 1; i <= tmp; i++) {
        if (i & 1)
          for (j = 1; j <= n; j++) vOut(j, a[j] / tmp);
        else
          for (j = n; j >= 1; j--) vOut(j, a[j] / tmp);
      }
    } else {
      for (i = 1; i <= tmp; i++) {
        for (j = 1; j <= n; j++)
          if ((a[j] & 1) == 0) vOut(j, a[j] / tmp / 2);
        for (j = 1; j <= n; j++)
          if (a[j] & 1) vOut(j, a[j] / tmp);
        for (j = n; j >= 1; j--)
          if ((a[j] & 1) == 0) vOut(j, a[j] / tmp / 2);
      }
    }
  }
  cout << endl;
  return 0;
}
