Common Letters
Completed
Read n words (first line n). Print the letters that appear in every word, sorted, as one string. Print - if there are none.
Input
Line 1: n. Then n words.
Output
One line.
Example
Input
3 bella label roller
Output
el
Editor
Python
Hints
Intersect the letter-sets of all words.
&= updates a set in place.
Solution explanation
x or "-" uses the fallback when x is empty (falsy).
Show solution
n = int(input())
common = set(input())
for _ in range(n - 1):
common &= set(input())
print("".join(sorted(common)) or "-")