#include <bits/stdc++.h>
using namespace std;
int n, A[27];
vector<int> S;
int gcd(int x, int y) { return !y ? x : gcd(y, x % y); }
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &A[i]);
    if (A[i] & 1) S.push_back(i);
  }
  if (S.size() >= 2) {
    puts("0");
    for (int i = 0; i < n; ++i)
      while (A[i]--) printf("%c", i + 'a');
    return 0;
  }
  int ans = A[0];
  for (int i = 1; i < n; ++i) ans = gcd(ans, A[i]);
  cout << ans << endl;
  if (!S.size()) {
    for (int i = 0; i < ans / 2; ++i) {
      for (int j = 0; j < n; ++j)
        for (int k = 0; k < A[j] / ans; ++k) printf("%c", j + 'a');
      for (int j = n - 1; j >= 0; --j)
        for (int k = 0; k < A[j] / ans; ++k) printf("%c", j + 'a');
    }
  } else {
    for (int i = 0; i < ans; ++i) {
      for (int j = 0; j < n; ++j)
        if (~A[j] & 1)
          for (int k = 0; k < A[j] / ans / 2; ++k) printf("%c", j + 'a');
      for (int i = 0; i < A[S[0]] / ans; ++i) printf("%c", S[0] + 'a');
      for (int j = n - 1; j >= 0; --j)
        if (~A[j] & 1)
          for (int k = 0; k < A[j] / ans / 2; ++k) printf("%c", j + 'a');
    }
  }
}
