#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
string random_order(const vector<int> &v, int div) {
  string ret;
  for (int i = 0; i < v.size(); ++i)
    for (int j = 0; j < v[i] / div; ++j) ret.push_back('a' + i);
  return ret;
}
string strict_order(vector<int> v, int div) {
  int odd = 0, oddi = -1;
  string half;
  for (int i = 0; i < v.size(); ++i) {
    if ((v[i] /= div) % 2 == 1) {
      ++odd;
      oddi = i;
    }
    for (int j = 0; j < v[i] / 2; ++j) half.push_back('a' + i);
  }
  assert(odd < 2);
  auto snd_half = half;
  reverse(half.begin(), half.end());
  string mid;
  if (oddi != -1) mid = string(1, 'a' + oddi);
  return half + mid + snd_half;
}
int main() {
  int n;
  ios::sync_with_stdio(false);
  cin.tie(0);
  while (cin >> n) {
    vector<int> v(n);
    int g = 0;
    for (auto &e : v) cin >> e, g = gcd(g, e);
    int ans;
    for (ans = g; ans >= 1; --ans)
      if (g % ans == 0) {
        int odd = 0, oddi = -1;
        for (int i = 0; i < n; ++i)
          if ((v[i] / ans) % 2 == 1) {
            ++odd;
            oddi = i;
          }
        if (ans % 2 == 1) {
          if (odd < 2) {
            break;
          }
        } else {
          break;
        }
      }
    cout << ans << '\n';
    string ans_s;
    if (ans == 0)
      ans_s = random_order(v, 1);
    else if (ans % 2 == 1)
      ans_s = strict_order(v, ans);
    else {
      ans_s = random_order(v, ans);
      auto tmp = ans_s;
      reverse(tmp.begin(), tmp.end());
      ans_s += tmp;
      ans /= 2;
    }
    for (int i = 1; i <= max(1, ans); ++i) cout << ans_s;
    cout << '\n';
  }
}
