#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e9 + 70;
const long long mod = 1e9 + 7;
const int maxn = 1e5 + 1000;
int freq[26];
int gcd(int a, int b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  if (fopen("i.txt", "r")) freopen("i.txt", "r", stdin);
  int(n);
  scanf("%d", &n);
  vector<int> odds;
  vector<int> even;
  for (int i = (0); i < (n); i++) {
    int(t);
    scanf("%d", &t);
    freq[i] = t;
    if (t % 2 == 0)
      even.push_back(t);
    else
      odds.push_back(t);
  }
  if (odds.size() > 1) {
    cout << 0 << "\n";
    for (int i = (0); i < (n); i++) {
      for (int k = (0); k < (freq[i]); k++) {
        cout << (char)('a' + i);
      }
    }
    cout << endl;
    return 0;
  }
  if (odds.size() == 1) {
    int g = odds[0];
    for (int e : even) {
      g = gcd(g, e);
    }
    cout << g << "\n";
    string s = "";
    int special = -1;
    for (int i = (0); i < (n); i++) {
      if (freq[i] % 2 == 1) special = i;
    }
    s = s + (char)('a' + special);
    freq[special] -= g;
    string t = "";
    for (int i = (0); i < (n); i++) {
      for (int k = (0); k < (freq[i] / g / 2); k++) {
        t = t + (char)('a' + i);
      }
    }
    string f = "";
    for (char c : t) {
      f = f + c;
    }
    reverse((f).begin(), (f).end());
    for (int i = (0); i < (g); i++) {
      cout << s << t << f;
    }
    cout << "\n";
  } else {
    int g = 0;
    for (int i = (0); i < (n); i++) {
      g = gcd(g, freq[i]);
    }
    cout << g << "\n";
    string s = "";
    for (int i = (0); i < (n); i++) {
      for (int e = (0); e < (freq[i] / g); e++) {
        s = s + (char)('a' + i);
      }
    }
    string t = "";
    for (char c : s) {
      t = t + c;
    }
    reverse((t).begin(), (t).end());
    for (int i = (0); i < (g / 2); i++) {
      cout << s << t;
    }
    cout << "\n";
  }
  return 0;
}
