Company: Flipkart_4aug
Difficulty: medium
QWERTY Word Sort Problem Description A televised trivia contest has a rapid-fire qualifying round in which players must reorder a set of words according to the layout of a standard keyboard. The standard QWERTY keyboard order is QWERTYUIOPASDFGHJKL;ZXCVBNM. Write a program that sorts a given list of words using that QWERTY ordering instead of ordinary alphabetical order. 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 contains few lines (same as the number of lines in the input