// Задача "Палиндромность-4"
// 4-ая личная Интернет-олимпиада сезона 2007-2008
// Автор задачи: Владимир Ульянцев, ulyantsev@rain.ifmo.ru
// Автор решения: Сергей Поромов, poromov@rain.ifmo.ru

import java.io.*;
import java.util.*;

public class paly4_sp_wrong implements Runnable {

	public static void main(String[] args) {
		new Thread(new paly4_sp_wrong()).run();
	}

	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new FileReader(FILENAME + ".in"));
			out = new PrintWriter(FILENAME + ".out");
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	BufferedReader br;

	PrintWriter out;

	StringTokenizer st;
	
	boolean eof;

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	void myAssert(boolean e, String s) {
		if (!e) {
			throw new Error("Assertion failure " + s);
		}
	}

	private static final String FILENAME = "paly4";
	
	final int MAXC = (int) 1e6;
	
	char[] ans;
	int count = 0;
	
	void getAns(int l, int r, int[] c) {
		if (r < l) {
			return;
		}
		int[] nc = new int[26];
		count++;
		int s = 0;
		for (int i = 0; i < 26; i++) {
			nc[i] = c[i] / 2;
			s += nc[i];
		}
		int m = (l + r) >> 1;
		if (((r - l) & 1) == 0) {
			for (int i = 0; i < 26; i++) {
				if ((c[i] & 1) == 1) {
					ans[m] = (char)('a' + i);
					c[i]--;
					break;
				}
			}
			int len = m - l;
			for (int i = 0; i < 26; i++) {
				if ((c[i] & 1) == 1 && s < len) {
					s++;
					nc[i]++;
				}
			}
			getAns(l, m - 1, nc.clone());
			count++;
			for (int i = 0; i < 26; i++) {
				nc[i] = c[i] - nc[i];
			}
			getAns(m + 1, r, nc);
		} else {
			int len = m - l + 1;
			for (int i = 0; i < 26; i++) {
				if ((c[i] & 1) == 1 && s < len) {
					s++;
					nc[i]++;
				}
			}
			getAns(l, m, nc.clone());
			count++;
			for (int i = 0; i < 26; i++) {
				nc[i] = c[i] - nc[i];
			}
			getAns(m + 1, r, nc);
		}
		
	}

	public void solve() {
		int[] c = new int[26];
		int s = 0;
		for (int i = 0; i < 26; i++) {
			c[i] = nextInt();
			myAssert(0 <= c[i] && c[i] <= MAXC, "Wrong c");
			s += c[i];
		}
		myAssert(1 <= s && s <= MAXC, "Wrong sum of c");
		ans = new char[s];
		getAns(0, s - 1, c);
		for (int i = 0; i < s; i++) {
			out.print(ans[i]);
		}
		System.out.println(count);
	}
}
