import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }

void main(){
	long n = read.to!long;
	char[][] ss;
	for(int i = 0; i < n; i ++) ss ~= readln.chomp.to!(char[]);
	
	int[char] count;
	foreach(c; "abcdefghijklmnopqrstuvwxyz") count[c] = int.max;
	foreach(s; ss){
		int[char] tempcount;
		foreach(c; s){
			tempcount[c] += 1;
			}
		foreach(c; count.keys){
			if(c in tempcount){
				if(tempcount[c] < count[c]) count[c] = tempcount[c];
				}
			else count[c] = 0;
			}
		}
	
	string ans;
	foreach(c; "abcdefghijklmnopqrstuvwxyz") for(int i = 0; i < count[c]; i ++) ans ~= c;
	
	ans.writeln;
	}
