#include <bits/stdc++.h>
using namespace std;
void base() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int inf = 1e9 + 7;
int a[30];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  int n;
  cin >> n;
  int odd = 0;
  int g = -1;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (a[i] & 1) odd++;
    if (g == -1)
      g = a[i];
    else
      g = gcd(g, a[i]);
  }
  if (odd > 1) {
    cout << "0\n";
    for (int i = 0; i < n; ++i)
      while (a[i]--) cout << (char)(i + 'a');
    cout << "\n";
    return;
  }
  cout << g << "\n";
  if (odd == 0) {
    string res[2];
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < a[i] / g; ++j) res[0] += i + 'a';
    res[1] = res[0];
    reverse(res[1].begin(), res[1].end());
    for (int i = 0; i < g; ++i) cout << res[i & 1];
    cout << "\n";
  } else {
    string res[2], mid = "";
    for (int i = 0; i < n; ++i) {
      if (a[i] & 1) {
        for (int j = 0; j < a[i] / g; ++j) mid += i + 'a';
      } else {
        for (int j = 0; j < a[i] / (2 * g); ++j) res[0] += i + 'a';
      }
    }
    res[1] = res[0];
    reverse(res[1].begin(), res[1].end());
    res[0] = res[0] + mid + res[1];
    for (int i = 0; i < g; ++i) cout << res[0];
    cout << "\n";
  }
}
int main() {
  base();
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
