var
n,i,j:Longint;
s:String[50];
a:array[97..122]of Longint=(99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99);
b:array[97..122]of Longint;
begin
readln(n);
for i:=1 to n do begin
readln(s);
for j:=97 to 122 do b[j]:=0;
for j:=1 to length(s)do inc(b[ord(s[j])]);
for j:=97 to 122 do if a[j]>b[j]then a[j]:=b[j];
end;
for i:=97 to 122 do for j:=1 to a[i]do write(chr(i));
end.