#include <bits/stdc++.h>
using namespace std;
int n, a[50], Odd, ans;
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] % 2 == 1) Odd++;
  }
  if (Odd >= 2) {
    cout << '0' << endl;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= a[i]; j++) cout << (char)(96 + i);
    }
  }
  if (Odd == 1) {
    ans = a[1];
    for (int i = 2; i <= n; i++) ans = gcd(ans, a[i]);
    printf("%d\n", ans);
    for (int i = 1; i <= n; i++) a[i] /= ans;
    for (int i = 1; i <= ans; i++) {
      for (int i = 1; i <= n; i++) {
        if (a[i] % 2 == 0)
          for (int j = 1; j <= a[i] / 2; j++) cout << (char)(96 + i);
      }
      for (int i = 1; i <= n; i++) {
        if (a[i] % 2 == 1)
          for (int j = 1; j <= a[i]; j++) cout << (char)(96 + i);
      }
      for (int i = n; i >= 1; i--) {
        if (a[i] % 2 == 0)
          for (int j = 1; j <= a[i] / 2; j++) cout << (char)(96 + i);
      }
    }
  }
  if (Odd == 0) {
    ans = a[1];
    for (int i = 2; i <= n; i++) ans = gcd(ans, a[i]);
    printf("%d\n", ans);
    for (int i = 1; i <= n; i++) a[i] /= ans;
    for (int i = 1; i <= ans / 2; i++) {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= a[i]; j++) cout << (char)(96 + i);
      }
      for (int i = n; i >= 1; i--) {
        for (int j = 1; j <= a[i]; j++) cout << (char)(96 + i);
      }
    }
  }
}
