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

public class rhyme_aa_hash2 {
	public static void main(String[] args) {
		new rhyme_aa_hash2().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());
	}

	void check(boolean u) {
		if (!u) {
			throw new Error("Assertion failed!!!");
		}
	}

	String FNAME = "rhyme";

	int MAX = 100000;
	int MAX_LEN = 30;

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

	private void solve() throws IOException {
		int n = nextInt();
		check(0 <= n && n <= MAX);
		s = nextInt();
		check(1 <= s && s <= MAX);
		a = new String[n];
		b = new int[n];
		HashSet<String> hs = new HashSet<String>();
		for (int i = 0; i < a.length; i++) {
			a[i] = nextToken();
			check(1 <= a[i].length() && a[i].length() <= MAX_LEN);
			for (int j = 0; j < a[i].length(); j++) {
				check('a' <= a[i].charAt(j) && a[i].charAt(j) <= 'z');
				if (vowels.indexOf(a[i].charAt(j)) >= 0) {
					b[i]++;
				}
			}
			check(b[i] >= 1);
			check(!hs.contains(a[i]));
			hs.add(a[i]);
		}
		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];
			}
		}
		HashMap<String, Integer> hm = new HashMap<String, Integer>();
		for (int i = 0; i < a.length; i++) {
			if (s >= b[i] && w[s - b[i]] >= 0) {
				int suffix = -1;
				for (int j = 0; j < a[i].length(); j++) {
					if (vowels.indexOf(a[i].charAt(j)) >= 0) {
						suffix = j;
					}
				}
				StringBuilder sb = new StringBuilder();
				for (int j = suffix; j < a[i].length(); j++) {
					sb.append(a[i].charAt(j));
				}
				String suf = sb.toString();
				if (hm.containsKey(suf)) {
					write(i);
					write(hm.get(suf));
					return;
				}
				hm.put(suf, i);
			}
		}
		out.println(impossible);
	}

	int s;
	int[] samples;
	String[] a;
	int[] b;
	int[] w;

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

}