Company: Flipkart_UI_IITB
Difficulty: medium
QWERTY Sort Problem Description In a popular quiz show, contestants are selected for further rounds using the Fastest Finger First round. In this round, all contestants have to arrange a specific set of words according to the QWERTY order format of the keyboard. The QWERTY keypad order sequence is: QWERTYUIOPASDFGHJKLZXCVBNM Help contestants with a program to sort the given words based on the order specified in the problem statements. Read the input from STDIN and print the output to STDOUT. Do not print arbitrary strings anywhere in the program, as these contribute to the standard output and test cases will fail. 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 contains few lines (same as the number of lines in the input excluding the terminator) which contain the sorted list with each line containing one w