Company: Tesco_15nov
Difficulty: medium
Meera's Trolley Key Extraction Problem Description Meera's mother has purchased a luggage trolley for Meera. The trolley has a special feature - its key changes every day. The key is always an alphanumeric string, but never has the same character in consecutive places. Meera's mother receives the key every day as a message on her phone. While sharing the key with Meera, her mother adds some extra characters to safeguard against the 'man in the middle' attack. Can you write a program for Meera which accepts her mother's message as input and provides the key to open the trolley? Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output and test cases will fail. Examples Example 1: Input: Abbccde Output: Abcde Explanation: Meera's mother sent the message "Abbccde". Since the key does not have the same character in consecutive places, after removing all such occurrences we get the key as "Abc