Company: Societe_Generale_7Oct
Difficulty: medium
Cyber Codex Decoding Problem Description In a futuristic world, secret agents use a Cyber Codex to encrypt mission codes. An encrypted message is made of lowercase letters ( a - z ), digits ( 0 - 9 ) and the three special symbols & , @ and ! . Your task is to decode it. Decoding uses a key : a string of 26 distinct lowercase letters. A lowercase letter of the message decodes to the key character at that letter's alphabet position: a decodes to key[0] , b decodes to key[1] , and so on up to z , which decodes to key[25] . For example, with the key qwertyuiopasdfghjklzxcvbnm , a decodes to q and b decodes to w . The message is read from left to right as a sequence of pieces. Each piece is one of the following: A single letter c : it produces the decoded letter of c . A repetition &dc , where d is one digit and c is one lowercase letter: it produces the decoded letter of c , written exactly d times. A digit of 0 produces nothing. A reversed block @s@ , where s is a run of one or mo