Alien Dictionary
Words are sorted lexicographically according to the rules of an unknown alien alphabet. Given the sorted words, print the order of the letters. If several orders are valid print the lexicographically smallest one. Print an empty line if the ordering is contradictory.
Constraints
1 <= n <= 100 1 <= len(word) <= 100 Lowercase letters
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.