#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ld long double
#define N (1<<17)
#define M 1000000007
#define P complex<long long>
#define X real()
#define Y imag()
using namespace std;
map<string, int> mp;
vector<pair<int,string>> v;
string s;
int main() {
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
while(cin >> s) {
string st = "";
for(int i=0; i<3; i++) {
st.push_back(s[i]);
}
mp[st]++;
}
for(auto u:mp)
v.push_back(make_pair(u.second, u.first));
sort(v.rbegin(), v.rend());
string ans = "";
int lk = 0;
while(ans.size()<490) {
ans = ans + v[lk].second + "|";
lk++;
}
for(int i=0; i<150; i++) {
//cout << v[i].first << ", " << v[i].second << "\n";
}
cout<<ans;
}