A spy needs your help to encrypt a 5 letter message. 
To encrypt the message the following steps are need to be done:
1)Each letter of the message will be converted to it's equivalent number (i.e A=0, B=1,..Z=25) 
2)98, 57, 31, 45, 46 are the 5 numbers in the key.
3)Add the equivalent number of the first letter of the message to the first number of the key, then the equivalent number of the second letter of the message to the second number of the key and so on.
4)Take modulo 26 of the sum of each expression.
5)Convert the newly obtained numbers into it's equivalent letters (i.e 0=A, 1=B,…25=Z)
Print the final encrypted string.
Note: It is guaranteed that the given string only contains Only Upper-case Latin Letters.

-----Input:-----
- The first line of the input contains a single Integer $T$. $T$ denoting the number of testcases, description of each testcases contains.
- The first line of the each testcase contains a single string $S$. $S$ denoting the string which you need to encrypt

-----Output:-----
- For each test case, print encypted string i.e result of above operation.
Note: Each testcase output must be printed on new line

-----Constraints:-----
- $1 \leq T \leq 100$
- $1 \leq S \leq 5$

-----Sample Input:-----
2
HELLO
HELL

-----Sample Output:-----
BJQEI
BJQE

-----Explanation:-----
- For 1st Testcase : The conversion of "HELLO" to its equivalent number will be 7, 4, 11, 11, 14 respectively.
Then we add each equivalent number of the message with corresponding number in the key:
7 + 98 = 105
4 + 57 = 61 
11 + 31 = 42 
11 + 45 = 56
14 + 46 = 60
Further we take the sum:
105 modulo 26 = 1
61 modulo 26 = 9
42 modulo 26 = 16
56 modulo 26 = 4
60 modulo 26 = 8 
Finally, convert the newly obtained numbers into it's equivalent letters:
B
J
Q
E
I
Print the final string:
BJQEI

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
import string
from collections import OrderedDict
from itertools import zip_longest
dic = OrderedDict(zip(string.ascii_uppercase, range(0, 26)))
keys = [98, 57, 31, 45, 46]
t = int(input())
s1 = []
for i in range(t):
	s = input()
	for i in s:
		if i in dic.keys():
			s1.append(int(i.replace(i, str(dic[i]))))
	s2 = [sum(t) for t in zip_longest(s1, keys, fillvalue=0)]
	inv_dic = {v: k for (k, v) in dic.items()}
	s_1 = list()
	for i in range(len(s1)):
		s_1.append(s2[i] % 26)
	res = [inv_dic[i] for i in s_1]
	print(''.join(res))
	inv_dic.clear()
	res.clear()
	s1.clear()
	s2.clear()
	s_1.clear()


for _ in range(int(input())):
	n = input().strip()
	a = [98, 57, 31, 45, 46]
	x = []
	for i in range(len(n)):
		x.append(ord(n[i]) - 65 + a[i])
	for i in x:
		s = i % 26
		print(chr(s + 65), end='')
	print()


a = [98, 57, 31, 45, 46]
for _ in range(int(input())):
	S = list(input().strip())
	for x in range(len(S)):
		S[x] = chr((ord(S[x]) - ord('A') + a[x]) % 26 + ord('A'))
	print(''.join(S))


for x in range(int(input())):
	n = list(input())
	l = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
	list1 = [98, 57, 31, 45, 46]
	c = 0
	for i in range(0, len(n)):
		for j in range(0, len(l)):
			if n[i] == l[j]:
				s1 = j + list1[c]
				s2 = s1 % 26
				print(l[s2], end='')
		c += 1
	print('\n')


t = int(input())
l = [98, 57, 31, 45, 46]
for _ in range(t):
	s = input().strip().upper()
	a = 65
	z = ''
	for i in range(len(s)):
		x = ord(s[i]) - a
		x += l[i]
		x %= 26
		z += chr(x + a)
	print(z)


dict1 = {0: 98, 1: 57, 2: 31, 3: 45, 4: 46}
for _ in range(int(input().strip())):
	s = list(input().strip())
	ss = 0
	for i in range(len(s)):
		ss = ord(s[i]) - 65 + dict1[i]
		print(chr(ss % 26 + 65), end='')
	print()


import math

def solve(s):
	d = {'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9, 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19, 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25}
	key = [98, 57, 31, 45, 46]
	res = ''
	li = []
	n = len(s)
	for i in range(n):
		li.append((d[s[i]] + key[i]) % 26)
	d1 = {0: 'A', 1: 'B', 2: 'C', 3: 'D', 4: 'E', 5: 'F', 6: 'G', 7: 'H', 8: 'I', 9: 'J', 10: 'K', 11: 'L', 12: 'M', 13: 'N', 14: 'O', 15: 'P', 16: 'Q', 17: 'R', 18: 'S', 19: 'T', 20: 'U', 21: 'V', 22: 'W', 23: 'X', 24: 'Y', 25: 'Z'}
	for i in li:
		res += d1[i]
	print(res)

def __starting_point():
	try:
		t = int(input())
		for _ in range(t):
			s = input().strip()
			solve(s)
	except:
		pass
__starting_point()


n = int(input())
l = [98, 57, 31, 45, 46]
f = ''
for i in range(0, n):
	s = input().strip()
	for z in range(0, len(s)):
		k = ord(s[z]) - 65
		k = k + l[z]
		req = k % 26
		req = req + 65
		f = f + chr(req)
	print(f)
	f = ''


t = int(input())
lst = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range(t):
	s = input().lower()
	s = list(s.strip())
	new = []
	for j in s:
		j = lst.index(j)
		new.append(j)
	s.clear()
	for j in range(len(new)):
		if j == 0:
			s.append(new[0] + 98)
		elif j == 1:
			s.append(new[1] + 57)
		elif j == 2:
			s.append(new[2] + 31)
		elif j == 3:
			s.append(new[3] + 45)
		elif j == 4:
			s.append(new[4] + 46)
	new.clear()
	for j in s:
		new.append(j % 26)
	s = ''
	for j in new:
		s += lst[j]
	print(s.upper())


import sys
input = sys.stdin.readline
x = [98, 57, 31, 45, 46]
t = int(input())
for _ in range(t):
	p = list(input().strip())
	ans = ''
	for i in range(len(p)):
		ans += chr((int(ord(p[i])) - 65 + x[i]) % 26 + 65)
	print(ans)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
starttime = time.time()
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass

def pmat(A):
	for ele in A:
		print(*ele, end='\n')

def seive():
	prime = [1 for i in range(10 ** 6 + 1)]
	prime[0] = 0
	prime[1] = 0
	for i in range(10 ** 6 + 1):
		if prime[i]:
			for j in range(2 * i, 10 ** 6 + 1, i):
				prime[j] = 0
	return prime
for _ in range(L()[0]):
	s = input().strip()
	A = [ord(s[i]) - ord('A') for i in range(len(s))]
	B = [98, 57, 31, 45, 46]
	C = [(A[i] + B[i]) % 26 for i in range(len(A))]
	C = [chr(ord('A') + C[i]) for i in range(len(C))]
	print(''.join(C))
endtime = time.time()


from sys import stdin
input = lambda : stdin.readline().rstrip('\r\n')
inp = lambda : list(map(int, stdin.readline().rstrip('\r\n').split()))
tc = 1
(tc,) = inp()
for _ in range(tc):
	s = str(input())
	d = [98, 57, 31, 45, 46]
	a = [ord(i) - ord('A') for i in s]
	d = [(a[i] + d[i]) % 26 for i in range(len(s))]
	ans = [chr(i + ord('A')) for i in d]
	print(''.join(ans))


n = int(input())
l = [98, 57, 31, 45, 46]
a = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = input().strip().lower()
	ans = ''
	c = 0
	for j in s:
		k = a.index(j) + l[c]
		c += 1
		k = k % 26
		ans += a[k]
	print(ans.upper())