#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  while (cin >> n) {
    vector<int> v(n);
    for (int i = 0; i < n; i++) cin >> v[i];
    int senar = -1;
    bool b = true;
    for (int i = 0; i < n; i++) {
      if (v[i] % 2 != 0) {
        if (senar == -1)
          senar = i;
        else
          b = false;
      }
    }
    if (!b) {
      cout << 0 << endl;
      for (int i = 0; i < n; i++)
        for (int j = 0; j < v[i]; j++) cout << char('a' + i);
      cout << endl;
    } else {
      int res = v[0];
      for (int i = 0; i < n; i++) res = gcd(res, v[i]);
      cout << res << endl;
      if (res <= 2) {
        for (int i = 0; i < n; i++) {
          if (v[i] % 2 == 0)
            for (int j = 0; j < v[i] / 2; j++) cout << char('a' + i);
        }
        if (senar != -1)
          for (int j = 0; j < v[senar]; j++) cout << char('a' + senar);
        for (int i = n - 1; i >= 0; --i) {
          if (v[i] % 2 == 0)
            for (int j = 0; j < v[i] / 2; j++) cout << char('a' + i);
        }
        cout << endl;
      } else if (res % 2 != 0) {
        for (int c = 0; c < res; c++) {
          int tonto = -1;
          for (int i = 0; i < n; i++) {
            if (v[i] % (2 * res) == 0)
              for (int j = 0; j < v[i] / (2 * res); j++) cout << char('a' + i);
            else
              tonto = i;
          }
          if (tonto != -1)
            for (int j = 0; j < v[tonto] / res; j++) cout << char('a' + tonto);
          for (int i = n - 1; i >= 0; --i) {
            if (v[i] % (2 * res) == 0)
              for (int j = 0; j < v[i] / (2 * res); j++) cout << char('a' + i);
            else
              tonto = i;
          }
        }
      } else {
        res /= 2;
        for (int c = 0; c < res; c++) {
          int tonto = -1;
          for (int i = 0; i < n; i++) {
            if (v[i] % (2 * res) == 0)
              for (int j = 0; j < v[i] / (2 * res); j++) cout << char('a' + i);
            else
              tonto = i;
          }
          if (tonto != -1)
            for (int j = 0; j < v[tonto] / res; j++) cout << char('a' + tonto);
          for (int i = n - 1; i >= 0; --i) {
            if (v[i] % (2 * res) == 0)
              for (int j = 0; j < v[i] / (2 * res); j++) cout << char('a' + i);
            else
              tonto = i;
          }
        }
        cout << endl;
      }
    }
  }
}
