Company: bank of Australia_15sep
Difficulty: medium
String Rearrangement Pattern Problem Description You are given a string (str) where the characters have to be rearranged according to a specific pattern. The pattern is not given; only some examples that follow the pattern are provided. Your task is to analyze the provided examples, identify the pattern, and write a program that applies the same rearrangement to any given input string. Some examples following the pattern are given below: Input: HELLO, Output: GGKNN Input: WORLD, Output: VQQNC Input: OPEN, Output: NRDP Input: CLOSE, Output: BNNDUD Input: ZERO, Output: YGQQ Input: AAA, Output: ZCZ Input: BB, Output: AD 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. Input Format: The only line of input should contain a string, str, which needs to be rearranged. Output Format: The only line of output should display the rearranged string. Examples Example