#include <bits/stdc++.h>
using namespace std;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dc[] = {0, 1, 0, -1, 1, -1, -1, 1};
const double eps = 1e-9;
const int INF = 0x7FFFFFFF;
const long long INFLL = 0x7FFFFFFFFFFFFFFFLL;
const double pi = acos(-1);
template <class T>
T take(queue<T> &O) {
  T tmp = O.front();
  O.pop();
  return tmp;
}
template <class T>
T take(stack<T> &O) {
  T tmp = O.top();
  O.pop();
  return tmp;
}
template <class T>
T take(priority_queue<T> &O) {
  T tmp = O.top();
  O.pop();
  return tmp;
}
template <class T>
inline void getint(T &num) {
  bool neg = 0;
  num = 0;
  char c;
  while ((c = getchar_unlocked()) && (!isdigit(c) && c != '-'))
    ;
  if (c == '-') {
    neg = 1;
    c = getchar_unlocked();
  }
  do num = num * 10 + c - '0';
  while ((c = getchar_unlocked()) && isdigit(c));
  if (neg) num = -num;
}
template <class T>
inline bool inRange(T z, T a, T b) {
  return a <= z && z <= b;
}
void OPEN(string in = "input.txt", string out = "output.txt") {
  freopen(in.c_str(), "r", stdin);
  freopen(out.c_str(), "w", stdout);
  return;
}
int arr[30];
int n;
int main(int argc, const char *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int(i) = (0), _t = (n); i < (_t); ++(i)) cin >> arr[i];
  int sum = 0;
  for (int(i) = (0), _t = (n); i < (_t); ++(i)) sum += arr[i];
  if (sum == 1) {
    cout << 0 << "\n";
    for (int(i) = (0), _t = (n); i < (_t); ++(i))
      if (arr[i]) cout << char('a' + i);
    cout << "\n";
    return 0;
  }
  int ans = -1, lenans = 0;
  for (int(i) = (1), _t = (*min_element(arr, arr + n)); i <= (_t); ++(i)) {
    int oc = 0, ok = 0;
    for (int(j) = (0), _t = (n); j < (_t); ++(j))
      if (arr[j] % i == 0) {
        ++ok;
        if ((arr[j] / i) & 1) ++oc;
      }
    if (ok == n && oc <= 1) {
      int tmp = i * (2 - oc);
      if (tmp > ans) {
        ans = tmp;
        lenans = sum / i;
      }
    }
  }
  if (ans == -1) {
    cout << "0\n";
    for (int(i) = (0), _t = (n); i < (_t); ++(i))
      for (int(j) = (0), _t = (arr[i]); j < (_t); ++(j)) cout << char('a' + i);
    cout << "\n";
    return 0;
  }
  string res = "";
  for (int(i) = (0), _t = (lenans); i < (_t); ++(i)) res += ' ';
  cout << ans << "\n";
  if (lenans & 1) {
    char ocz = 0;
    for (int(i) = (0), _t = (n); i < (_t); ++(i))
      if ((arr[i] / ans) & 1) ocz = 'a' + i;
    res[lenans / 2] = ocz;
    --arr[ocz - 'a'];
    int ptrl = 0, ptrr = lenans - 1;
    for (int(i) = (0), _t = (n); i < (_t); ++(i)) {
      int cnt = arr[i] / ans;
      cnt >>= 1;
      while (cnt > 0) {
        res[ptrl++] = 'a' + i;
        res[ptrr--] = 'a' + i;
        --cnt;
      }
    }
    for (int(i) = (0), _t = (ans); i < (_t); ++(i)) cout << res;
    cout << "\n";
  } else {
    ans >>= 1;
    int ptrl = 0, ptrr = lenans - 1;
    for (int(i) = (0), _t = (n); i < (_t); ++(i)) {
      int cnt = arr[i] / ans;
      cnt >>= 1;
      while (cnt > 0) {
        res[ptrl++] = 'a' + i;
        res[ptrr--] = 'a' + i;
        --cnt;
      }
    }
    for (int(i) = (0), _t = (ans); i < (_t); ++(i)) cout << res;
    cout << "\n";
  }
  return 0;
}
