#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <string>

using namespace std;

bool check(string s)
{
    size_t si = s.length();
    for (size_t i = 0; i < si / 2; i++)
        if (s[i] != s[si - i - 1])
            return false;
    return true;
}

int main()
{
    freopen("answer.in", "r", stdin);
    freopen("answer.out", "w", stdout);
    size_t n;
    cin >> n;
    vector<string> str;
    for (size_t i = 0; i < n; i++)
    {
        string s;
        cin >> s;
        str.push_back(s);
	}
    for (size_t i = 0; i < n; i++)
        for (size_t j = 0; j < n; j++)
            for (size_t k = 0; k < n; k++)
                if (i != k && i != j && j != k)
                    if (check(str[i] + str[j] + str[k]))
                    {
                        cout << str[i] << " " << str[j] << " " << str[k] << endl;
                        return 0;
                    }
	cout << "Sorry, but I don't know question!\n";
}