#include <bits/stdc++.h>
using namespace std;
int n;
int c[34];
int odd;
int nwd(int a, int b) {
  if (a > b) {
    return nwd(b, a);
  }
  if (!a || !b) {
    return a + b;
  }
  return nwd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> c[i];
    odd += c[i] & 1;
  }
  if (odd > 1) {
    cout << 0 << endl;
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < c[i]; ++j) cout << (char)(i + 'a');
    cout << endl;
    return 0;
  }
  if (odd == 1) {
    cerr << "Nakurwiam konstrukcje (OD)" << endl;
    int gcd = c[0];
    for (int i = 1; i < n; ++i) {
      gcd = nwd(gcd, c[i]);
    }
    cout << gcd << endl;
    for (int i = 0; i < gcd; ++i) {
      for (int j = 0; j < n; ++j)
        if (c[j] % 2 == 0)
          for (int l = 0; l < c[j]; l += 2 * gcd) {
            cout << (char)(j + 'a');
          }
      for (int j = 0; j < n; ++j)
        if (c[j] & 1)
          for (int l = 0; l < c[j]; l += gcd) {
            cout << (char)(j + 'a');
          }
      for (int j = n - 1; j >= 0; --j)
        if (c[j] % 2 == 0)
          for (int l = 0; l < c[j]; l += 2 * gcd) {
            cout << (char)(j + 'a');
          }
    }
    cout << endl;
    return 0;
  }
  cerr << "Nakurwiam konstrukcje (EV)" << endl;
  int gcd = c[0];
  for (int i = 1; i < n; ++i) {
    gcd = nwd(gcd, c[i]);
  }
  cout << gcd << endl;
  for (int i = 0; i < gcd; i += 2) {
    for (int j = 0; j < n; ++j)
      for (int l = 0; l < c[j]; l += gcd) {
        cout << (char)(j + 'a');
      }
    for (int j = n - 1; j >= 0; --j)
      for (int l = 0; l < c[j]; l += gcd) {
        cout << (char)(j + 'a');
      }
  }
  cout << endl;
}
