1.Given a sorted dictionary of an alien language having N words and k starting alphabets of standard dictionary. 2.You have to to complete the function which returns a string denoting the order of characters in the language.
Input Format
1.First line contains an integer N and k denoting the size of the dictionary. 2.Then in the next line are sorted space separated values of the alien dictionary.
Output Format
Return the denoting the order of the alphabets
Constraints
1 <= N <= 100 1 <= k <= 26 1 <= Length of words <= 1000
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
5 4 baa abcd abca cab cad
Output
bdac