#include <bits/stdc++.h>
using namespace std;
string rev(string a) {
  string b;
  b = a;
  for (int i = 0; i < a.length(); i++) b[i] = a[a.length() - 1 - i];
  return b;
}
int gcd(int a, int b) {
  if (a < b) a = a + b;
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  int r[100], all = 0, ans = 0, q = 1, cnt = 0;
  string answer = "";
  string str[100];
  for (int i = 0; i < n; i++) str[i] = "a";
  for (int i = 0; i < n; i++) str[i][0] = 'a' + i;
  for (int i = 0; i < n; i++) {
    cin >> r[i];
    all += r[i];
  }
  if (n == 1) {
    cout << r[0] << endl;
    for (int i = 0; i < r[0]; i++) cout << (char)('a');
    cout << endl;
    return 0;
  }
  int s = 0, t = 0;
  for (int i = 0; i < n; i++)
    if (r[i] % 2) {
      s++;
      t = i;
    }
  if (s > 1) {
    cout << 0 << endl;
    for (int i = 0; i < n; i++)
      for (int k = 0; k < r[i]; k++) answer += str[i];
    cout << answer << endl;
    return 0;
  } else if (s == 1) {
    int gcdd = r[0];
    for (int i = 1; i < n; i++) gcdd = gcd(gcdd, r[i]);
    cout << gcdd << endl;
    for (int i = 0; i < n; i++) r[i] /= gcdd;
    for (int i = 0; i < n; i++)
      if (t != i)
        for (int k = 0; k < r[i] / 2; k++) answer += str[i];
    for (int k = 0; k < r[t]; k++) answer += str[t];
    for (int i = n - 1; i >= 0; i--)
      if (t != i)
        for (int k = 0; k < r[i] / 2; k++) answer += str[i];
    for (int i = 0; i < gcdd; i++) cout << answer;
    cout << endl;
    return 0;
  } else {
    for (int i = 0; i < n; i++) r[i] /= 2;
    int gcdd = r[0];
    for (int i = 1; i < n; i++) gcdd = gcd(gcdd, r[i]);
    cout << gcdd * 2 << endl;
    for (int i = 0; i < n; i++) r[i] /= gcdd;
    for (int i = 0; i < n; i++)
      for (int k = 0; k < r[i]; k++) answer += str[i];
    answer += rev(answer);
    for (int i = 0; i < gcdd; i++) cout << answer;
    cout << endl;
    return 0;
  }
  return 0;
}
