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

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

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	boolean eof = false;
	Random rand = new Random(125475452);

	private void run() {
		Locale.setDefault(Locale.US);
		try {
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	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());
	}

	String FNAME = "rhyme";

	int MAX = 100000;
	int MAX_LEN = 30;

	String vowels = "aeiouy";
	String impossible = "Impossible";

	private void solve() throws IOException {
		long time = System.currentTimeMillis();
		int n = nextInt();
		s = nextInt();
		a = new char[n][];
		b = new int[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = nextToken().toCharArray();
			for (int j = 0; j < a[i].length; j++) {
				if (vowels.indexOf(a[i][j]) >= 0) {
					b[i]++;
				}
			}
		}
		System.out.println((System.currentTimeMillis() - time) / 1000.0);
		if (n < 2) {
			out.println(impossible);
			return;
		}
		samples = new int[31];
		Arrays.fill(samples, -1);
		for (int i = 0; i < a.length; i++) {
			samples[b[i]] = i;
		}
		w = new int[s + 1];
		Arrays.fill(w, -1);
		w[0] = 0;
		for (int i = 0; i < w.length; i++) {
			if (w[i] < 0) {
				continue;
			}
			for (int j = 0; j < samples.length; j++) {
				if (samples[j] < 0 || i + j >= w.length) {
					continue;
				}
				w[i + j] = samples[j];
			}
		}
		System.out.println((System.currentTimeMillis() - time) / 1000.0);
		c = new int[n * MAX_LEN + 1][26];
		ends = new int[c.length];
		for (int i = 0; i < c.length; i++) {
			Arrays.fill(c[i], -1);
		}
		Arrays.fill(ends, -1);
		int free = 1;
		for (int i = 0; i < a.length; i++) {
			int top = 0;
			for (int j = a[i].length - 1; j >= 0; j--) {
				int ch = a[i][j] - 'a';
				if (c[top][ch] < 0) {
					c[top][ch] = free++;
				}
				top = c[top][ch];
			}
			ends[top] = i;
		}
		System.out.println((System.currentTimeMillis() - time) / 1000.0);
		good = new int[c.length];
		if (!dfs(0, 0)) {
			out.println("Impossible");
		}
		System.out.println((System.currentTimeMillis() - time) / 1000.0);
	}

	int s;
	int[] samples;
	char[][] a;
	int[] b;
	int[][] c;
	int[] w;
	int[] ends;
	int[] good;

	private boolean dfs(int x, int vows) {
		int g1 = -1;
		int g2 = -1;
		if (vows > 0 && ends[x] >= 0 && s >= b[ends[x]]
				&& w[s - b[ends[x]]] >= 0) {
			g1 = ends[x];
		}
		for (int i = 0; i < c[x].length; i++) {
			int j = c[x][i];
			if (j >= 0) {
				if (dfs(j, vows + isVowel(i))) {
					return true;
				}
				if (good[j] >= 0) {
					if (g1 == -1) {
						g1 = good[j];
					} else {
						g2 = good[j];
					}
				}
			}
		}
		if (g2 >= 0 && vows > 0) {
			write(g1);
			write(g2);
			return true;
		}
		good[x] = g1;
		return false;
	}

	private void write(int last) {
		int x = s - b[last];
		while (x > 0) {
			for (int i = 0; i < a[w[x]].length; i++) {
				out.print(a[w[x]][i]);
			}
			out.print(" ");
			x -= b[w[x]];
		}
		out.println(a[last]);
	}

	private int isVowel(int i) {
		return vowels.indexOf((char) (i + 'a')) >= 0 ? 1 : 0;
	}

}