#include <bits/stdc++.h>
using namespace std;
int n, cnt[26];
int main() {
  cin.sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> cnt[i];
  n = 0;
  for (auto c : cnt) n += c;
  for (int d = n; d > 0; d--) {
    string left, mid, right;
    bool valid = true;
    for (int i = 0; i < 26; i++) {
      if (cnt[i] % d != 0)
        valid = false;
      else {
        int toAdd = cnt[i] / d;
        for (int j = 1; j < toAdd; j += 2) {
          left.push_back('a' + i);
          right.push_back('a' + i);
        }
        if (toAdd % 2 == 1) {
          if (mid == "" || d % 2 == 0)
            mid.push_back('a' + i);
          else
            valid = false;
        }
      }
    }
    if (valid) {
      reverse(right.begin(), right.end());
      string ret = left + mid + right;
      for (int i = 1; i < d; i++)
        for (int j = 0; j < n / d; j++)
          ret.push_back(ret[ret.size() - 1 - 2 * j]);
      cout << d << '\n' << ret << '\n';
      return 0;
    }
  }
  cout << "0\n";
  for (int i = 0; i < 26; i++)
    for (int j = 0; j < cnt[i]; j++) cout.put('a' + i);
  cout << '\n';
  return 0;
}
