#define _USE_MATH_DEFINES #include #include #include #include #include #include //#include #include #include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)< ///////// typedef long long LL; typedef long double LD; ///////// using namespace::std; ///////// int main(void){ std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed;// cout << setprecision(16);// int N; cin>>N; string S[50]; string ans = ""; int ansCount = 0; int sum = 0; rep(i,N){ cin>>S[i]; sum += (int)S[i].size(); } int top[50]; rep(i,N){ top[i] = 0; } LL bit = 0; LL bitPrev = ( (LL)1<= S[i].size() ){ flag = true; }else if( bitPrev & (LL)1<= S[i][ top[i] + j] ){ ans = ans + S[i][ top[i] + j ]; ++count; }else{ break; } } top[i] += count; ansCount += count; sa = 0; bitPrev = 0; rep(k,N){ if( top[k] < S[k].size() ){ bitPrev += (LL)1< 1 ){ bitPrev = bit; ++sa; } } P(ans); return 0; }