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

public class rhyme_ab implements Runnable {

	final int MAXN = 100000;
	final int MAXS = 100000;
	final int MAXL = 30;
	final int LN = 2;
	
	private void solve() throws IOException {
		int n = in.nextInt();
		int s = in.nextInt();
		assert 0 <= n && n <= MAXN;
		assert 1 <= s && s <= MAXS;
		
		Word[] wl = new Word[n];
		boolean[] vn = new boolean[MAXL + 1];
		Word[] vo = new Word[MAXL + 1];
		for (int i = 0; i < n; ++i) {
			wl[i] = new Word(in.next());
			vn[wl[i].vcnt] = true;
			vo[wl[i].vcnt] = wl[i];
		}
		
		boolean[] cc = new boolean[s + 1];
		cc[0] = true;
		Word[] par = new Word[s + 1];
		for (int i = 0; i < cc.length; ++i) {
			if (!cc[i]) continue;
			for (int j = 0; j < vn.length && i + j < cc.length; ++j) {
				if (!vn[j]) continue;
				cc[i + j] = true;
				par[i + j] = vo[j];
			}
		}
		
		boolean[] mask = new boolean[MAXL + 1];
		for (int i = 0; i < mask.length; ++i) {
			mask[i] = s - i >= 0 && cc[s - i];
		}
		
		Arrays.sort(wl);
		int p = 0;
		int[] vcnt = new int[MAXL + 1];
		for (int i = 0; i < wl.length; ++i) {
			if (i + 1 == wl.length || !wl[i + 1].sfx.equals(wl[p].sfx)) {
				Arrays.fill(vcnt, 0);
				for (int j = p; j <= i; ++j) {
					++vcnt[wl[j].vcnt];
				}
				
				int[] wlr = new int[LN];
				Arrays.fill(wlr, -1);
				for (int q = 0; q < wlr.length; ++q) {
					for (int j = 0; j < vcnt.length; ++j) {
						if (mask[j] && vcnt[j] > 0) {
							wlr[q] = j;
							--vcnt[j];
							break;
						}
					}
				}
				
				if (wlr[wlr.length - 1] >= 0) {
					Word[] wwr = new Word[wlr.length];
					for (int j = p; j <= i; ++j) {
						for (int q = 0; q < wlr.length; ++q) {
							if (wl[j].vcnt == wlr[q]) {
								wwr[q] = wl[j];
								wlr[q] = -1;
								break;
							}
						}
					}
					
					for (Word w : wwr) {
						int x = s - w.vcnt;
						while (x > 0) {
							out.print(par[x].word + " ");
							x -= par[x].vcnt;
						}
						out.println(w.word);
					}
					return;
				}
				p = i + 1;
			} else {
				assert !wl[i + 1].word.equals(wl[i].word);
			}
		}
		
		out.println("Impossible");
	}

	final String VOWELS = "aeiouy";
	
	class Word implements Comparable<Word> {
		String word;
		String sfx;
		int vcnt;
		
		public Word(String s) {
			assert s.length() <= MAXL;
			this.word = s;
			int ind = -1;
			for (int i = 0; i < s.length(); ++i) {
				char c = s.charAt(i);
				assert 'a' <= c && c <= 'z';
				if (VOWELS.indexOf(c) >= 0) {
					ind = i;
					++vcnt;
				}
			}
			assert ind >= 0;
			sfx = s.substring(ind);
		}

		@Override
		public int compareTo(Word o) {
			int t = sfx.compareTo(o.sfx);
			if (t != 0) return t;
			return word.compareTo(o.word);
		}
	}
	
	
	final String FILE_NAME = "rhyme";

	SimpleScanner in;
	PrintWriter out;

	@Override
	public void run() {
		try {
			in = new SimpleScanner(new FileReader(FILE_NAME + ".in"));
			out = new PrintWriter(FILE_NAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}

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

	class SimpleScanner extends BufferedReader {

		private StringTokenizer st;
		private boolean eof;

		public SimpleScanner(Reader a) {
			super(a);
		}

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

		boolean seekEof() {
			String s = next();
			if ("".equals(s) && eof)
				return true;
			st = new StringTokenizer(s + " " + st.toString());
			return false;
		}

		private String cnv(String s) {
			if (s.length() == 0)
				return "0";
			return s;
		}

		int nextInt() {
			return Integer.parseInt(cnv(next()));
		}

		double nextDouble() {
			return Double.parseDouble(cnv(next()));
		}

		long nextLong() {
			return Long.parseLong(cnv(next()));
		}
	}
}