STRHH - Half of the half


Given a sequence of 2*k characters, please print every second character from the first half of the sequence. Start printing with the first character.

Input

In the first line of input you are given the positive integer t (1<=t<=100) - the number of test cases. In the each of the next t lines, you are given a sequence of 2*k (1<=k<=100) characters.

Output

For each of the test cases please please print every second character from the first half of a given sequence (the first character should appear).

Example

Input:
4
your 
progress 
is 
noticeable

Output:
y
po
i
ntc

hide comments
marouf_codes: 2016-05-30 11:45:44

VS gives me the right answer but SPOJ says that its wrong. Am I missing something?

vicky_abishek: 2016-05-27 18:36:33

could anyone explain how those output came , i couldn't understand these -_-. so frustating , codechef is better in explaining those test cases. they told to print every second character from the first half of the sequence ,then why "yu" is not displayed in the first one ?

singhsatyam_2: 2016-05-17 10:54:24

all test cases compiled except progress
required output: po
min answer:por

ap13: 2016-05-01 10:47:00

You need to take array size 200 , because in question ( 2*k (1<=k<=100) ) -> k varies from 0 to 100 and , it's minimum value is 0 and maximum is 200.

spawndon: 2016-04-15 14:40:04

@aviben: Why does changing max value of string from 100 to 200 solve the error? The program is running fine on my computer in both cases, but SPOJ definitely needs a value of 200. Weird.

aviben: 2016-03-20 19:16:19

People getting run time error max value of k is 100 so max string is 200 -_-

aswin_tekur: 2016-03-12 05:51:49

I've got the correct output on IDLE, ideone. But SPOJ says time exceeded!

oelgazzar: 2016-03-08 20:50:22

I tested my code on Ideone.com and it showed success.
but judge status still says run time error !!

justin0979: 2016-03-06 03:57:56

I failed this many times. I tried to get fancy and ended up with about 50 lines of code in c++. This program does not require that much. Keep it simple as far as control structures go. The tricky part, for me, was how to approach the answer mathematically (i.e. how I set up my condition for one part); but, that's just me.

abhash_yadav: 2016-03-05 16:17:25

for those who are getting right answer in other places, not here, try scanf instead of getchar(), etc


Added by:kuszi
Date:2012-09-01
Time limit:1s-1.289s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64