let char_next c = char_of_int (1 + int_of_char c)

let ans n s =
  let array = Array.make 26 0 in
  let rec f c =
    if c = '{' then array
    else (
      let rec g i min_len =
        if i = n then min_len
        else
          let t = s.(i) in
          let rec h j count =
            try
              if c = t.[j] then h (j + 1) (count + 1)
              else h (j + 1) count
            with _ -> count
          in g (i + 1) (min (h 0 0) min_len)
      in
      array.(int_of_char c - 97) <- g 0 50;
      f (char_next c)
    )
  in f 'a'

let () =
  let n = read_int () in
  let s = Array.init n (fun i -> read_line ()) in
  let array = ans n s in
  let rec f i =
    if i < 26 then (
      let rec g j =
        if j > 0 then (
          print_char (char_of_int (i + 97));
          g (j - 1)
        )
      in
      g array.(i);
      f (i + 1)
    )
  in
  f 0
