#include //define fin cin //define fout cout #define F first #define S second #define pii pair < int , int > using namespace std; typedef long long ll; const int nmax = 1e6 + 10; int n , i; char s[nmax]; string ans , act; int main() { #ifndef ONLINE_JUDGE freopen("input.in","r",stdin); freopen("output.out","w",stdout); #endif // ONLINE_JUDGE /* ifstream fin("input.in"); ofstream fout("output.out"); */ for (i = 1; ; ++i) { gets(s); if (feof(stdin)) break; act = s; if (act.size() == 0) break; if (i == 1) ans = s; else if (ans != s) ans += s; } cout << ans; return 0; }