#include <bits/stdc++.h>
const int MAX_N = (int)1e5 + 123;
const double eps = 1e-6;
const int inf = (int)1e9 + 123;
using namespace std;
int n;
int a[30];
char to[30];
inline int gcd(int a, int b) {
  while (a) {
    swap(a, b);
    a %= b;
  }
  return b;
}
inline bool can(int x, string &second) {
  if (x % 2 == 0) {
    for (int i = 1; i <= n; i++)
      for (int j = 0; j < a[i] / x; j++) second += to[i];
    return 1;
  }
  int odd = 0, id = -1;
  for (int i = 1; i <= n; i++)
    if ((a[i] / x) % 2 == 1) {
      odd++;
      id = i;
      if (odd > 1) return 0;
    }
  if (id != -1) {
    swap(a[id], a[n]);
    swap(to[id], to[n]);
  }
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < a[i] / x / 2 + ((a[i] / x) % 2); j++) second += to[i];
  for (int i = n; i > 0; i--)
    for (int j = 0; j < a[i] / x / 2; j++) second += to[i];
  return 1;
}
inline void out(string &second, bool tp) {
  if (!tp)
    for (int i = 0; i < int((second).size()); i++) cout << second[i];
  else
    for (int i = int((second).size()) - 1; i >= 0; i--) cout << second[i];
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) to[i] = char('a' + i - 1);
  int g = 0;
  for (int i = 1; i <= n; i++) g = gcd(g, a[i]);
  string second = "";
  for (int i = g; i > 0; i--) {
    if (g % i != 0) continue;
    second = "";
    if (can(i, second)) {
      cout << i << endl;
      for (int j = 0; j < i; j++) {
        if (i % 2 == 0 && j % 2 == 1)
          out(second, 1);
        else
          out(second, 0);
      }
      return 0;
    }
  }
  cout << "0\n";
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < a[i]; j++) cout << to[i];
  return 0;
}
