#include<stdio.h>
#include<string.h>

#define MAX 11
#define S_MAX 101

int InsideCommon( const char *a, const char *b ){
	if( strstr( a, b ) )
		return 1;
	else
		return 0;
}

void Overlap( const char *a, const char *b, char * ret ){
	unsigned int i, j, len = 0;
	unsigned int alen = strlen(a);
	unsigned int blen = strlen(b);
	unsigned int min_len = alen < blen ? alen : blen;
	
	for(i = min_len; i >= 1; --i){
		int bOk = 1;
		for(j = 0; j < i; ++j){
			if( a[ alen - i + j ] != b[ j ] ){
				bOk = 0;
			}
		}
		if( bOk ){
			len = i;
			break;
		}
	}
	strcpy( ret, a );
	strcat( ret, b + len );
}

int invest;

int strless( const char *a, const char *b ){
	if( strlen( a ) < strlen( b ) )
		return 1;
	else if( strlen( a ) == strlen( b ) && strcmp( a, b ) <= 0 )
		return 0;
	else
		return 0;
}

void solve(int n, const char strs[MAX-1][MAX], int *bUsed, char *now, char *ans){
	int i;
	int bAllUsed = 1;

	for(i = 0; i < n; ++i){
		if( !bUsed[i] ){
			char t[S_MAX]="";
			bAllUsed = 0;
			
			strcpy(t,now);

			if( InsideCommon( t, strs[i] ) ){
				bUsed[i] = 1;
				solve( n, strs, bUsed, t, ans );
				bUsed[i] = 0;
				continue;
			}
			if( InsideCommon( strs[i], t ) ){
				strcpy( t, strs[i] );
				bUsed[i] = 1;
				solve( n, strs, bUsed, t, ans );
				bUsed[i] = 0;
				continue;
			}

			Overlap( now, strs[i], t );
			bUsed[i] = 1;
			if( strless( t, ans ) )
				solve( n, strs, bUsed, t, ans );
			bUsed[i] = 0;
		}
	}
	
	if( bAllUsed ){
		if( strless( now, ans ) )
			strcpy( ans, now );
	}
}

int main(){
	while(1){
		int i,j,n;
		char now[S_MAX]="";
		char ans[S_MAX]="";
		char strs[MAX-1][MAX]={{"",},};
		int bUsed[MAX-1]={0,};

		scanf("%d", &n);
		if(n == 0)break;

		for(i = 0; i < n; ++i){
			int bSkip = 0;
			scanf("%s", strs[i]);
			
			for(j = 0; j < i; ++j){
				if( InsideCommon( strs[j], strs[i] ) ){
					bSkip = 1;
					break;
				}
			}
			
			if( bSkip ){
				--n;
				--i;
				continue;
			}
			strcat(ans,strs[i]);
		}

		invest = 0;
		//printf("N: %d BEST STATE: %s\n", n, ans);
		solve( n, strs, bUsed, now, ans );
		
		printf("%s\n", ans);
	}
}