String Algorithm

String Algorithm

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Time Limit: 1.0 s

Memory Limit: 256.0 MB

Description

You are given a string S. You need to follow below process:

  1. Remove all even position character from the string S.
  2. If there are no even position remain in the string, print it. Otherwise follow step 1.

For example : String S="abcd".

S ="abcd", even position character mark in the bold. After remove S become "ac".

S="ac", even position character mark in the bold. After remove S become "a".

Now, S="a", there are no even position present in the string. So answer it.

Input

First Line T, Number of test case.
In each test case, a string S.

\(1<=T<=10^3\)
\(1<=|S|<=10^5\)
String S conatins only english lowercase alphabets.

It is gurantee that sum of |S| overall test case doesn't exceed \(10^5\)

Output

In each test case, print remaining string S.

Sample

Input Output
2
abcd
p
a
p

First test case explain in the problem statement.

Bangladesh 2.0

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
8
Start at
2024-08-16 15:30
End at
2024-08-16 17:45
Duration
2.2 hour(s)
Host
Partic.
133