/**************************************************
filename :e.cpp
author :maksyuki
created time :2018/1/22 21:06:11
last modified :2018/1/22 21:12:34
file location :C:\Users\abcd\Desktop\TheEternalPoet
***************************************************/
#pragma comment(linker, "/STACK:102400000,102400000")
#include <set>
#include <bitset>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <vector>
#include <ios>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <complex>
#include <numeric>
#include <functional>
#include <cmath>
#include <ctime>
#include <climits>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cassert>
using namespace std;
#define CFF freopen ("in", "r", stdin)
#define CFO freopen ("out", "w", stdout)
#define CPPFF ifstream cin ("in")
#define CPPFO ofstream cout ("out")
#define DB(ccc) cout << #ccc << " = " << ccc << endl
#define DBT printf("time used: %.2lfs\n", (double) clock() / CLOCKS_PER_SEC)
#define PB push_back
#define MP(A, B) make_pair(A, B)
typedef long long LL;
typedef unsigned long long ULL;
typedef double DB;
typedef pair <int, int> PII;
typedef pair <int, bool> PIB;
const int INF = 0x7F7F7F7F;
const int MOD = 1e9 + 7;
const double EPS = 1e-10;
const double PI = 2 * acos (0.0);
const int maxn = 1e5 + 6666;
set<string> dict;
int main()
{
#ifdef LOCAL
CFF;
//CFO;
#endif
string s;
while(cin >> s) {
if(!dict.count(s)) dict.emplace(s);
}
string sa, sb, sc;
for(set<string>:: iterator it = dict.begin(); it != dict.end(); it++) {
sa = *it;
int len = sa.size();
bool is_find = false;
for(int i = 1; i < len; i++) {
sb = sa.substr(0, i);
sc = sa.substr(i, len - i);
if(dict.count(sb) && dict.count(sc)) {
is_find = true;
break;
}
}
if(is_find) cout << *it << endl;
}
return 0;
}