Company: Flipkart_4aug
Difficulty: medium
QWERTY Word Sort Problem Description In a popular quiz show, contestants are selected for further rounds using the Fastest Finger First round. Many of the questions require them to arrange a given list of words according to the QWERTY order format. The standard QWERTY keyboard order is QWERTYUIOPASDFGHJKL;ZXCVBNM. Help contestants with a program to sort the given words based on the QWERTY specified in the problem statements. Read the input from STDIN and print the output to STDOUT. Do not print anything else to stderr anywhere in the program, as these contribute to the output and test cases will fail. Constraints All the characters in each word are in uppercase format only The input does not contain any numbers, special characters, or any lower case letters. Input Format The input contains few lines and there is one word in each line, with the last line always containing 'X' (without quotes) which indicates the end of the list (X is not part of the list). Output Format The output conta