function Main(input) {
  input = input.split("\n");
  var n = parseInt(input[0]);
  s = new Array(n);
  for(i=0;i<n;i++){
    s[i]=input[i+1];
  }
  alf = new Array(26).fill(0);
  for(i=0;i<alf.length;i++){
    alfsub = new Array(n).fill(0);
    alf[i]=alfsub;
  }
  alf2= new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
  for(i=0;i<n;i++){
    for(j=0;j<alf2.length;j++){
      regexp = new RegExp(alf2[j],'g');
      if(s[i].match(regexp)!=null){
      alf[j][i]=s[i].match(regexp).length;
      }
    }
  }
  var ans ="";
  for(i=0;i<alf.length;i++){
    for(j=0;j<Math.min.apply(null,alf[i]);j++){
      ans+=alf2[i];
    }
  }

  console.log('%s', ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));