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
linuxguy4213: 2016-11-10 06:02:00

Misleading instructions should say "print every other character up until the middle of the sequence", not "print every 2nd character".

steelarm: 2016-11-06 07:30:22

I am getting SIGSEGV error with my submission even though it runs perfectly with GCC and on ideone.com . Any help ?

Last edit: 2016-11-06 07:30:53
kkurzynowski: 2016-10-27 12:09:35

Im getting NZEC with C# although my code working correctly. I've tried to change my main() type from void to int and end by returning 0, but it won't help. Any ideas?

bad_code: 2016-09-27 15:25:54

my program always passes the 3 visible test cassses but fails at the hidden test case. How do i even find out where the problem fails if i can't see the place where it fails?

abhi11095: 2016-09-23 19:28:07

The third case is not accepted and in progress case another character is showing after po

mahashwetha: 2016-09-14 19:51:48

why the third case fails always ?even though expected and actul o/p match in their comparison o/p screen ?

akashpreet: 2016-08-28 20:14:03

1)Every Input String should not exceed length of 200
->we need to print 1st char of every string
->And every 2nd char till it reach half the length of word
2) in Given example
your -> its half is ->yo->so output is ->y
progress - > its half is ->prog->so output is ->po
is -> its half is->i->so output is->i (since we need to print 1st char)
noticeable-> its half is-> notic->so output is->ntc

gauravfeb1996: 2016-08-27 22:24:09

can anyone explain the problem??

surya_1998: 2016-08-03 16:40:08

Hey! @gvsharma see if your program still gives the correct answer if your first string has more than 4 strings, that was where i failed.

gvsharma: 2016-08-03 13:51:54

the third test case is always firing me..what to do?


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