#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int a[26];
int b[26];
char buf[100001];
int sum = 0;
int n;
vector<int> divs;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int ispos(int sum) {
  if (sum % 2 == 0) {
    for (int(i) = 0; (i) < (n); (i)++) {
      if (b[i] % 2 != 0) return 0;
    }
    return 1;
  } else {
    int ocnt = 0;
    for (int(i) = 0; (i) < (n); (i)++) {
      if (b[i] % 2 != 0) {
        if (!ocnt)
          ocnt = 1;
        else
          return 0;
      }
    }
    return 1;
  }
}
int main() {
  scanf("%d", &(n));
  for (int(i) = 0; (i) < (n); (i)++) scanf("%d", &(a[i]));
  int g = a[0];
  for (int(i) = 0; (i) < (n); (i)++) {
    g = gcd(g, a[i]);
    sum += a[i];
  }
  int i;
  for (i = 1; i <= g; i++) {
    if (g % i == 0) divs.push_back(i);
  }
  int ans = 0;
  int ind = -1;
  for (auto &x : divs) {
    int T = sum / x;
    for (int(i) = 0; (i) < (n); (i)++) {
      b[i] = a[i] / x;
    }
    if (ispos(T)) {
      if (T % 2 == 0) {
        if (ans < 2 * x) {
          ans = 2 * x;
          ind = x;
        }
      } else {
        if (ans < x) {
          ans = x;
          ind = x;
        }
      }
    }
  }
  if (ans == 0) {
    puts("0");
    for (int(i) = 0; (i) < (n); (i)++) {
      for (int(j) = 0; (j) < (a[i]); (j)++) {
        printf("%c", 'a' + i);
      }
    }
  } else {
    printf("%d\n", ans);
    int T = sum / ind;
    for (int(i) = 0; (i) < (n); (i)++) a[i] /= ind;
    if (T % 2 == 0) {
      int j = 0;
      for (int(i) = 0; (i) < (n); (i)++) {
        for (int(k) = 0; (k) < (a[i] / 2); (k)++) {
          buf[j] = 'a' + i;
          buf[T - 1 - j] = 'a' + i;
          j++;
        }
      }
    } else {
      int j = 0;
      for (int(i) = 0; (i) < (n); (i)++) {
        if (a[i] % 2 == 0) {
          for (int(k) = 0; (k) < (a[i] / 2); (k)++) {
            buf[j] = 'a' + i;
            buf[T - 1 - j] = 'a' + i;
            j++;
          }
        } else {
          int mid = T / 2;
          for (int k = mid - a[i] / 2; k <= mid + a[i] / 2; k++) {
            buf[k] = 'a' + i;
          }
        }
      }
    }
    for (int(i) = 0; (i) < (ind); (i)++) {
      printf("%s", buf);
    }
  }
  return 0;
}
