import java.io.*;
import java.util.HashSet;
import java.util.StringTokenizer;

public class answer_vd {
	BufferedReader in;
	StringTokenizer str;
	PrintWriter out;
	String SK;

	String next() throws IOException {
		while ((str == null) || (!str.hasMoreTokens())) {
			SK = in.readLine();
			if (SK == null)
				return null;
			str = new StringTokenizer(SK);
		}
		return str.nextToken();
	}

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

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

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

	int reverse(int val) {
		char[] a = (val + "").toCharArray();
		int res = 0;
		for (int i = a.length - 1; i >= 0; --i) {
			res = res * 10 + a[i] - '0';
		}
		return res;
	}

	void solve() throws IOException {
		int n = nextInt();
		assert n >= 1;
		assert n <= 900;
		int[] a = new int[n];
		int[] rev = new int[n];
		int[] len = new int[n];
		HashSet<Integer> set = new HashSet<Integer>();
		for (int i = 0; i < n; i++) {
			a[i] = nextInt();
			assert a[i] >= 1;
			assert a[i] <= (int) 1e+9;
			assert !set.contains(a[i]);
			set.add(a[i]);
			rev[i] = reverse(a[i]);
			len[i] = (a[i] + "").length();
		}
		long[] pow10 = new long[19];
		pow10[0] = 1;
		for (int i = 1; i <= 18; i++) {
			pow10[i] = pow10[i - 1] * 10L;
		}

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				if (i != j) {
					for (int sz = 1; sz <= 9 && sz <= len[i] + len[j]; sz++) {
						long curv = (long) rev[j] * pow10[len[i]] + rev[i];
						int k = (int) (curv % pow10[sz]);
						if (!set.contains(k) || k / pow10[sz - 1] == 0
								|| k == a[i] || k == a[j]) {
							continue;
						}
						if (curv / pow10[sz] == ((long) a[i] * pow10[len[j]] + a[j])
								% pow10[len[i] + len[j] - sz]) {
							out.println(a[i] + " " + a[j] + " " + k);
							return;
						}
					}
				}
			}
		}

		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				if (i != j) {
					for (int sz = 1; sz <= 9 && sz <= len[i] + len[j]; sz++) {
						long curv = (long) rev[i] * pow10[len[j]] + rev[j];
						int k = (int) (curv / pow10[len[i] + len[j] - sz]);
						if (!set.contains(k) || k / pow10[sz - 1] == 0
								|| (k == a[i]) || (k == a[j])) {
							continue;
						}
						if (curv % pow10[len[i] + len[j] - sz] == ((long) a[j]
								* pow10[len[i]] + a[i])
								/ pow10[sz]) {
							out.println(k + " " + a[j] + " " + a[i]);
							return;
						}
					}
				}
			}
		}
		out.println("Sorry, but I don't know answer!");
	}

	void run() throws IOException {
		in = new BufferedReader(new FileReader("answer.in"));
		out = new PrintWriter("answer.out");
		solve();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new answer_vd().run();
	}

}