import std.array;
import std.range;
import std.algorithm;
import std.conv;
import std.stdio;
import std.string;
import std.traits;
import std.ascii;


class Solver {
  private int[char] hash;
  private bool firstUpdate = true;

  public this() {
    foreach(c; lowercase) {
      hash[c] = 0;
    }
  }

  public void updateState(string str) {
    if(firstUpdate) {
      foreach(c; str) {
        hash[c]++;
      }
    } else {
      int[char] tempHash;
      foreach(c; lowercase) {
        tempHash[c] = 0;
      }
      foreach(c; str) {
        tempHash[c]++;
      }
      foreach(c; lowercase) {
        hash[c] = min(tempHash[c], hash[c]);
      }      
    }
    firstUpdate = false;
  }

  public string ans() {
    string ans;
    foreach(c; lowercase) {
      ans ~= c.repeat().take(hash[c]).array;
    }
    return ans;
  }
}


void main(string[] args) {
  auto a = new Solver();
  int n = readln.chomp.to!int;
  foreach(i; iota(n)) {
    a.updateState(readln.chomp);
  }
  a.ans.writeln;
}