Server Time: Sat Sep 26, 2020 11:05 am
Welcome ( logout
B - The Hardest Job
PDF (English) Ranklist
Time Limit: 2 second(s) Memory Limit: 32 MB

The Hardest Job

Certainly, we have entered into the era of modern science. Revolution has occurred in communication field. It is now easy to communicate via cell phone, e-mail, fax and many other fast ways. In particular, SMS is being popular day by day. But even now some of the ancient way of communication is not yet thrown to recycle bin. Farther they are popular also! One of them is letters. Yes, I am talking about handwritten letters. Perhaps, it is popular from the thought that at least something of the writer we have. So, letters are frequently used for even in short range communication.

Now, you want to write a letter to someone very special. But you have only your younger brother as the postman. There is nothing wrong with the boy except the fact that he is very very curious. You wonder if he read your letter before giving it to the right person. So, you decided to encode the letter. As the special person for whom you wrote the letter must decode it, you wanted to keep the encoding scheme simple and easy but secure enough to hide from your brother. And finding an easy but secure encoding is the HARDEST JOB. However, you end up with an idea. You decided to shift all the characters in the odd position one position left in the odd position and the characters in the even position one position right in the even positions. The shifting will be circular i.e. the last characters should be round back to the first position. Is it looking clumsy? Don’t worry; an example will illustrate the thing:

Suppose, you want to write

I LOVE YOU

The characters in the odd positions are: ‘I’, ‘L’, ‘V’, ‘ ’, ‘O’

The characters in the even positions are: ‘ ’, ‘O’, ‘E’, ‘Y’, ‘U’

If you shift the odd characters one position left you will get: ‘L’,’V’, ‘ ’, ‘O’, ‘I’

If you shift the even characters one position right you will get: ‘U’, ‘ ’, ‘O’, ‘E’, ‘Y’

Combining together you will get the encoded message:

LUV  OOEIY

Certainly secure enough to hide from your brother :-)

But doing the encoding and decoding by hand is time consuming. So, you decided to write a program to do the conversion. For now the encoding part is enough as the special person is intelligent enough to do the decoding job. You write the program and submit it to verify whether it is working or not.

 

Input:

The input consists of several test cases. The first line contains an integer N (N<10000) which denotes the number of test cases. Each of the following N lines will contain a string of alphanumeric characters, punctuations and blank spaces. You may assume that no black line will be present.

 

Output:

For each line of input print one line containing the encoded text.

 

Sample Input:

1

I LOVE YOU

 

Sample Output:

LUV  OOEIY

 


Problem Setter: Md. Towhidul Islam Talukder
Special Thanks: Shahidul Islam
Developed and Maintained by
JANE ALAM JAN
Copyright © 2012
LightOJ, Jane Alam Jan