#include <bits/stdc++.h>
using namespace std;
int n, a[200007], sum;
string res;
bool is_palindrome(int len) {
  if (sum % len) return false;
  int k = sum / len;
  if (len % 2) {
    for (int np = 0; np < n; np++) {
      bool ok = (a[np] % k == 0 && (a[np] / k) % 2 == 1);
      for (int j = 0; j < n; j++)
        ok &= (np == j || (a[j] % k == 0 && (a[j] / k) % 2 == 0));
      if (!ok) continue;
      res = "";
      for (int j = 0; j < n; j++)
        for (int t = 0; t < a[j] / (2 * k); t++) res += char(j + 'a');
      string resr = res;
      reverse(resr.begin(), resr.end());
      res += char(np + 'a');
      res += resr;
      cout << k << endl;
      for (int t = 0; t < k; t++) cout << res;
      cout << endl;
      return true;
    }
  } else {
    bool ok = true;
    for (int j = 0; j < n; j++) ok &= (a[j] % k == 0 && (a[j] / k) % 2 == 0);
    if (!ok) return false;
    res = "";
    for (int j = 0; j < n; j++)
      for (int t = 0; t < a[j] / (2 * k); t++) res += char(j + 'a');
    string resr = res;
    reverse(resr.begin(), resr.end());
    res += resr;
    cout << k << endl;
    for (int t = 0; t < k; t++) cout << res;
    cout << endl;
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  for (int len = 1; len <= sum - 1; len++)
    if (sum % len == 0) {
      int k = sum / len;
      if (k % 2) {
        if (is_palindrome(len)) return 0;
      } else {
        bool ok = true;
        for (int j = 0; j < n; j++) ok &= (a[j] % k == 0);
        if (!ok) continue;
        res = "";
        for (int j = 0; j < n; j++)
          for (int t = 0; t < a[j] / (k); t++) res += char(j + 'a');
        string resr = res;
        reverse(resr.begin(), resr.end());
        cout << k << endl;
        for (int t = 0; t < k; t++) {
          if (t % 2)
            cout << res;
          else
            cout << resr;
        }
        cout << endl;
        return 0;
      }
    }
  if (is_palindrome(sum)) return 0;
  cout << 0 << endl;
  for (int j = 0; j < n; j++)
    for (int t = 0; t < a[j]; t++) res += char(j + 'a');
  cout << res << endl;
  return 0;
}
