#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int n, a[maxn];
vector<int> v1, v2;
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
void pri() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= a[i]; j++) printf("%c", i + 'a' - 1);
  cout << endl;
}
int main() {
  cin >> n;
  int tot = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    tot += a[i];
    if (a[i] & 1)
      v1.push_back(i);
    else if (a[i])
      v2.push_back(i);
  }
  int m1 = v1.size(), m2 = v2.size();
  if (m1 + m2 == 1) {
    cout << tot << endl;
    pri();
    return 0;
  }
  int g = 0;
  for (int i = 1; i <= n; i++) g = gcd(a[i], g);
  if (tot & 1) {
    if (m1 >= 2) {
      cout << "0" << endl;
      pri();
      return 0;
    }
    cout << g << endl;
    a[v1[0]] -= g;
    for (int k = 1; k <= g; k++) {
      for (int i = 1; i <= n; i++)
        for (int j = 1; j <= a[i] / g / 2; j++) printf("%c", i + 'a' - 1);
      printf("%c", v1[0] + 'a' - 1);
      for (int i = n; i; i--)
        for (int j = 1; j <= a[i] / g / 2; j++) printf("%c", i + 'a' - 1);
    }
    cout << endl;
  } else {
    if (m1) {
      cout << "0" << endl;
      pri();
      return 0;
    }
    cout << g << endl;
    for (int k = 1; k <= g; k++) {
      if (k & 1)
        for (int i = 1; i <= n; i++)
          for (int j = 1; j <= a[i] / g; j++) printf("%c", i + 'a' - 1);
      else
        for (int i = n; i; i--)
          for (int j = 1; j <= a[i] / g; j++) printf("%c", i + 'a' - 1);
    }
    cout << endl;
  }
  return 0;
}
