#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) return gcd(b, a);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int brute(int n, int a[]) {
  int o[101000];
  int k = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < a[i]; ++j) o[k++] = i;
  }
  int ans = 0;
  do {
    int nok = 0;
    for (int i = 0; i < k; ++i) {
      bool ok = true;
      for (int j = 0; j < k / 2; ++j) {
        if (o[(i + j) % k] != o[(i - j - 1 + 2 * k) % k]) {
          ok = false;
          break;
        }
      }
      if (ok) ++nok;
    }
    ans = max(ans, nok);
  } while (std::next_permutation(&o[0], &o[k]));
  return ans;
}
int solve(int n, int a[], string &str) {
  if (n == 1) {
    for (int i = 0; i < a[0]; ++i) str += 'a';
    return a[0];
  }
  int d = a[0];
  for (int i = 1; i < n; ++i) d = gcd(d, a[i]);
  int np = 0;
  int n2 = 0;
  for (int i = 0; i < n; ++i)
    if ((a[i] / d) % 2 != 0) {
      ++n2;
      np = i;
    }
  if (n2 <= 1 || d % 2 == 0) {
    if (d % 2 == 0) {
      for (int k = 0; k < d; ++k) {
        if (k & 1)
          for (int i = 0; i < n; ++i)
            for (int j = 0; j < a[i] / d; ++j) str += 'a' + i;
        else
          for (int i = n - 1; 0 <= i; --i)
            for (int j = 0; j < a[i] / d; ++j) str += 'a' + i;
      }
      return d;
    }
    a[np] -= d;
    for (int k = 0; k < d; ++k) {
      str += 'a' + np;
      for (int i = 0; i < n; ++i)
        for (int j = 0; j < a[i] / d / 2; ++j) str += 'a' + i;
      for (int i = n - 1; 0 <= i; --i)
        for (int j = 0; j < a[i] / d / 2; ++j) str += 'a' + i;
    }
    a[np] += d;
    return d;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < a[i]; ++j) str += 'a' + i;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  int n, a[99];
  cin >> n;
  int sa = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    sa += a[i];
  }
  string str;
  int r2 = solve(n, a, str);
  cout << r2 << " " << str << "\n";
  cout.flush();
  return 0;
}
