require 'set'

def merge(s, w)
	return w if s == ""
	([0, s.size-w.size].max..s.size-1).each{|i|
		if s[i..s.size-1] == w[0..s.size-i-1]
			return s[0..i-1] + w
		end
	}
	return s + w
end

loop {
	n = gets.to_i
	break if n == 0
	words = (1..n).map {gets.chomp}.sort_by(&:size)
	tmp = []
	until words.empty?
		tmp << words.pop
		words.delete_if{|w| tmp[-1] =~ /#{w}/}
	end
	words = tmp
	n = words.size

	dist = (1..n).map{[Float::INFINITY] * n}
	(0..n-1).each{|i|
		(0..n-1).each{|j|
			next if i == j
			dist[i][j] = merge(words[i], words[j]).size - words[i].size
		}
	}

	opt = {}
	(0..n-1).each{|i|
		opt[[[i], i]] = [words[i].size, words[i]]
	}

	(1..n-1).each{|k|			
		(0..n-1).to_a.combination(k){|reached|
			reached.each{|i|
				((0..n-1).to_a - reached).each{|j|
					key = [(reached + [j]).sort, j]
					prev = opt[[reached, i]]
					value = prev[0] + dist[i][j]
					new_s = merge(prev[1], words[j])
					if opt[key]
						opt[key] = [value, new_s] if value < opt[key][0] || (value == opt[key][0] && new_s < opt[key][1])
					else
						opt[key] = [value, new_s]
					end
				}
			}
		}
	}

	candidates = (0..n-1).map{|i| opt[[(0..n-1).to_a, i]]} 
	min_len = candidates.map(&:first).min
	strs = candidates.select{|l, a| l == min_len}.map(&:last)
	puts strs.min
}