#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int n, arr[N];
int num = 0, idx, sum = 0;
string s;
void print(int ans) {
  printf("%d\n", ans);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < arr[i]; j++) putchar('a' + i);
  }
  puts("");
  exit(0);
}
void print2(int ans) {
  printf("%d\n", ans);
  puts(s.c_str());
  exit(0);
}
bool check(int num) {
  if (sum % 2 == 0 && num % 2 == 0) num /= 2;
  for (int i = 0; i < n; i++) {
    if ((arr[i] % (2 * num)) != 0) return false;
  }
  return true;
}
string make(int num) {
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += arr[i];
  }
  sum /= num;
  string ret;
  ret.resize(sum);
  int i = 0, j = sum - 1;
  for (int k = 0; k < n; k++) {
    arr[k] /= (2 * num);
    while (arr[k] > 0) {
      arr[k]--;
      ret[i++] = k + 'a';
      ret[j--] = k + 'a';
    }
  }
  return ret;
}
void make_one(int idx1, int ans) {
  string tmp(1, idx1 + 'a');
  string tmp2 = make(ans);
  for (int j = 0; j < (int)tmp2.size(); j++) tmp += tmp2[j];
  s.resize(sum);
  for (int i = 0; i < sum; i++) s[i] = tmp[i % (int)tmp.size()];
  print2(ans);
}
void make_two(int idx1, int idx2, int ans) {
  string tmp(2, idx1 + 'a');
  string tmp2;
  if (sum % 2 == 0) {
    tmp2 = make(ans / 2);
    for (int j = 0; j < (int)tmp2.size() / 2; j++) tmp += tmp2[j];
    if (idx2 != -1) {
      tmp += idx2 + 'a';
      tmp += idx2 + 'a';
    } else {
      tmp += idx1 + 'a';
      tmp += idx1 + 'a';
    }
    for (int j = (int)tmp2.size() / 2; j < (int)tmp2.size(); j++)
      tmp += tmp2[j];
  } else {
    tmp2 = make(ans);
    for (int j = 0; j < (int)tmp2.size(); j++) tmp += tmp2[j];
  }
  s.resize(sum);
  for (int i = 0; i < sum; i++) s[i] = tmp[i % (int)tmp.size()];
  print2(ans);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    if (arr[i] % 2 == 1) {
      num++;
      idx = i;
    }
    sum += arr[i];
  }
  if (n == 1) print(sum);
  if (num > 1) print(0);
  if (num == 1) {
    for (int i = arr[idx]; i > 0; i -= 2) {
      arr[idx] -= i;
      if (check(i)) make_one(idx, i);
      arr[idx] += i;
    }
    assert(false);
  }
  for (int ans = sum / 2; ans > 0; ans--) {
    for (int i = 0; i < n; i++) {
      if (arr[i] < 2 * ans) continue;
      arr[i] -= 2 * ans;
      if (check(ans)) make_two(i, -1, ans);
      arr[i] += 2 * ans;
    }
    if (ans % 2 == 1) continue;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        if (arr[i] < ans || arr[j] < ans) continue;
        arr[i] -= ans;
        arr[j] -= ans;
        if (check(ans)) make_two(i, j, ans);
        arr[i] += ans;
        arr[j] += ans;
      }
    }
  }
  assert(false);
  return 0;
}
