Article directory
topic description
Given a string of unencrypted strings str, encryption is achieved by changing each letter of the string. The encryption method is to offset each letter str[i] by the amount of a specific array element a[i], the array a The first three bits have been assigned: a[0]=1, a[1]=2, a[2]=4.
When i >= 3, several elements a[i]=a[i-1]+a[i-2]+a[i-3].
For example: the original abcde encrypted bdgkr, where the offsets are 1, 2, 4, 7, 13 respectively.
enter description
The first line is an integer n (1<=n<=1000), indicating that there are n sets of test data, each set of data contains one line, the original text str (contains only lowercase letters, 0<length<=50).
output description
Output one line for each set of test data, representing the ciphertext of the string.