#include <bits/stdc++.h>
using namespace std;
int gcd(int m, int n) { return (m % n == 0) ? n : gcd(n, m % n); }
int N;
int occ[26];
int main() {
  ios::sync_with_stdio(0);
  cin >> N;
  int odd = 0, d = 0;
  for (int i = 0; i < N; i++) {
    cin >> occ[i];
    odd += (occ[i] % 2);
    if (d == 0)
      d = occ[i];
    else
      d = gcd(d, occ[i]);
  }
  if (odd >= 2) {
    cout << "0\n";
    for (int i = 0; i < N; i++)
      for (int j = 0; j < occ[i]; j++) cout << (char)(i + 'a');
  } else if (odd == 1) {
    cout << d << "\n";
    for (int i = 0; i < d; i++) {
      for (int j = 0; j < N; j++)
        if (occ[j] % 2 == 0) {
          for (int k = 0; k < occ[j] / (2 * d); k++) cout << (char)(j + 'a');
        }
      for (int j = 0; j < N; j++)
        if (occ[j] % 2 == 1) {
          for (int k = 0; k < occ[j] / d; k++) cout << (char)(j + 'a');
        }
      for (int j = N - 1; j >= 0; j--)
        if (occ[j] % 2 == 0) {
          for (int k = 0; k < occ[j] / (2 * d); k++) cout << (char)(j + 'a');
        }
    }
  } else {
    cout << d << "\n";
    for (int i = 0; i < d; i++) {
      if (i % 2 == 0) {
        for (int j = 0; j < N; j++)
          for (int k = 0; k < occ[j] / d; k++) cout << (char)(j + 'a');
      } else {
        for (int j = N - 1; j >= 0; j--)
          for (int k = 0; k < occ[j] / d; k++) cout << (char)(j + 'a');
      }
    }
  }
  return 0;
}
