Alice guesses the strings that Bob made for her.

At first, Bob came up with the secret string $a$ consisting of lowercase English letters. The string $a$ has a length of $2$ or more characters. Then, from string $a$ he builds a new string $b$ and offers Alice the string $b$ so that she can guess the string $a$.

Bob builds $b$ from $a$ as follows: he writes all the substrings of length $2$ of the string $a$ in the order from left to right, and then joins them in the same order into the string $b$.

For example, if Bob came up with the string $a$="abac", then all the substrings of length $2$ of the string $a$ are: "ab", "ba", "ac". Therefore, the string $b$="abbaac".

You are given the string $b$. Help Alice to guess the string $a$ that Bob came up with. It is guaranteed that $b$ was built according to the algorithm given above. It can be proved that the answer to the problem is unique.


-----Input-----

The first line contains a single positive integer $t$ ($1 \le t \le 1000$) — the number of test cases in the test. Then $t$ test cases follow.

Each test case consists of one line in which the string $b$ is written, consisting of lowercase English letters ($2 \le |b| \le 100$) — the string Bob came up with, where $|b|$ is the length of the string $b$. It is guaranteed that $b$ was built according to the algorithm given above.


-----Output-----

Output $t$ answers to test cases. Each answer is the secret string $a$, consisting of lowercase English letters, that Bob came up with.


-----Example-----
Input
4
abbaac
ac
bccddaaf
zzzzzzzzzz

Output
abac
ac
bcdaf
zzzzzz



-----Note-----

The first test case is explained in the statement.

In the second test case, Bob came up with the string $a$="ac", the string $a$ has a length $2$, so the string $b$ is equal to the string $a$.

In the third test case, Bob came up with the string $a$="bcdaf", substrings of length $2$ of string $a$ are: "bc", "cd", "da", "af", so the string $b$="bccddaaf".

Difficulty: introductory

Starter code:

Solutions:
import sys
import random
from math import *
 
def input():
    return sys.stdin.readline().strip()
 
def iinput():
    return int(input())

def finput():
    return float(input())

def tinput():
    return input().split()

def linput():
    return list(input())
 
def rinput():
    return map(int, tinput())

def fiinput():
    return map(float, tinput())
 
def rlinput():
    return list(map(int, input().split()))
def trinput():
    return tuple(rinput())

def srlinput():
    return sorted(list(map(int, input().split())))

def YESNO(fl):
    if fl:
        print("NO")
    else:
        print("YES")
    
    
def main():   
    #n = iinput() 
    #k = iinput() 
    #m = iinput() 
    #n = int(sys.stdin.readline().strip()) 
    #n, k = rinput()
    #n, m = rinput()
    #m, k = rinput()
    #n, k, m = rinput()
    #n, m, k = rinput()
    #k, n, m = rinput()
    #k, m, n = rinput() 
    #m, k, n = rinput()
    #m, n, k = rinput()
    #q = srlinput()
    #q = rlinput()
    s = input()
    print(s[:2] + s[3::2])

    
    
            
            
    
    
    
    
for inytd in range(iinput()):
    main()

tests = int(input())
for _ in range(tests):
    n = input()
    for i in range(len(n) // 2):
        print(n[2 * i], end = '')
    print(n[-1])


from collections import Counter, defaultdict

BS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def to_base(s, b):
    res = ""
    while s:
        res+=BS[s%b]
        s//= b
    return res[::-1] or "0"
alpha = "abcdefghijklmnopqrstuvwxyz"
from math import floor, ceil,pi

t = int(input())
for i in range(t):
    s = list(input())
    ans = s[0]
    for i in range(1, len(s), 2):
        ans += s[i]
    print(ans)

from sys import stdin, stdout, setrecursionlimit
for _ in range(int(input())):
    s = input()
    ans = s[0]
    for i in range(1, len(s), 2):
        ans += s[i]
    print(ans)




for i in range(int(input())):
    s=input()
    print(s[0]+s[1:-1:2]+s[-1])

import sys
INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

def solve():
  s = input()
  print(s[::2] + s[-1])

t, = I()
while t:
  t -= 1
  solve()

for t in range(int(input())):
    s = input()
    print(''.join([s[i] for i in range(len(s)) if i%2==0]+[s[-1]]))

T = int(input())

for t in range(T):
    a = input()
    b = a[0]
    for i in range(1, len(a)-1, 2):
        b += a[i]
    b += a[-1]
    print(b)


import sys
import math
def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	s = SI()
	ans = ""
	for i in range(0,len(s),2):
		ans+=s[i]
	print(ans+s[-1])

for nt in range(int(input())):
	s = input()
	ans = s[0]
	for i in range(1,len(s),2):
		ans+=s[i]
	print (ans)

t=int(input())
count=0
while count<t:
    count+=1
    s=input()
    ans=''
    i=0
    while i<len(s):
        ans+=s[i]
        i+=2
    print(ans+s[-1])


t = int(input())
for gsdagsa in range(t):
	s = list(input())
	r = ''
	for i in range(len(s)-1):
		if i % 2 == 0:
			r += s[i]
	r += s[-1]
	print(r)

from sys import stdin

input = stdin.readline


def main():
    test = int(input())

    for _ in range(test):
        # n = int(input())
        # l = [int(i) for i in input().split(" ")]
        # n,k = [int(i) for i in input().split(" ")]
        # a,b,c,d = [int(i) for i in input().split(" ")]
        #
        # l = []
        # l = [int(i) for i in input().split(" ")]
        #
        # for i in l:
        #     print(i, end=' ')
        # print()

        s = input().strip()

        ns = s[0]

        for i in range(1, len(s)-1, 2):
            ns += s[i]

        ns += s[len(s)-1]
        print(ns)


main()


for _ in range(int(input())):
    a=input()
    ans=''
    ans+=a[0]+a[1]
    for i in range(3,len(a),2):
        ans+=a[i]
    print(ans)

for __ in range(int(input())):
    a = input()
    ans = a[0]
    for i in range(1, len(a), 2):
        ans += a[i]
    print(ans)

t = int(input())
for i in range(t):
    a = list(input())
    b = ""
    for i in range(1,len(a),2):
        b = b + a[i]
    b = a[0] + b
    print(b)

T = int(input())
for _ in range(T):
    s = input()
    print(s[::2]+s[-1])


"""
Author: Q.E.D
Time: 2020-06-16 09:36:16
"""
T = int(input())
for _ in range(T):
    b = input()
    a = b[0] + b[1:-1:2] + b[-1]
    print(a)

t=int(input())
for i in range(t):
    a=input()
    s=a[0]+a[1:len(a)-1:2]+a[-1]
    print(s)

# @author 

import sys

class AShortSubstrings:
    def solve(self, tc=0):
        for _ in range(int(input())):
            b = input().strip()
            print(''.join(b[i] for i in range(len(b)) if i % 2 == 0) + b[-1])


solver = AShortSubstrings()
input = sys.stdin.readline

solver.solve()


t=int(input())
for _ in range(t):
    s=input()
    ans=s[0]
    for i in range(1,len(s),2):
        ans+=s[i]
    print(ans)


import sys
sys.setrecursionlimit(10000)
# default is 1000 in python


t = int(input())
# t = 1

for _ in range(t):
	b = input()
	a = b[0]
	for i in range(1,len(b)-1,2):
		a += b[i]
	a += b[-1]
	print(a)



# try:
	# raise Exception
# except:
	# print("-1")
	

# thenos.sort(key=lambda x: x[2], reverse=True)

# int(math.log(max(numbers)+1,2))

# 2**3 (power)

# a,t = (list(x) for x in zip(*sorted(zip(a, t))))

# to copy lists use .copy()

# pow(p, si, 1000000007) for modular exponentiation

# my_dict.pop('key', None)
# This will return my_dict[key] if key exists in the dictionary, and None otherwise.





t = int(input())
for i in range(t):
    s = input()
    res=s[0]
    for i in range(1,len(s)-1,2):
        res+=s[i]
    res+=s[-1]
    print(res)



for _ in range(int(input())):
    s = input()

    print(s[0] + s[1:-1][::2] + s[-1])


from sys import stdin
from collections import defaultdict as dd
from collections import deque as dq
from collections import Counter
import itertools as it
from math import sqrt, log, log2, ceil, floor
from fractions import Fraction

t = int(input())
for _ in range(t):
    s = input()
    ans = ''
    for i in range(0, len(s), 2):
        ans += s[i]
    ans += s[-1]
    print(ans)
# n, m = map(int, input().split())
# nums = list(map(int, stdin.readline().split()))


import sys
import math
from math import factorial as f
from collections import defaultdict as dd
mod=1000000007
T=1
T=int(sys.stdin.readline())
for _ in range(T):
    s=input()
    ans=''
    for i in range(0,len(s),2):
        ans+=s[i]
    print(ans+s[-1])
        


from math import *

def r1(t):
    return t(input())

def r2(t):
    return [t(i) for i in input().split()]

def r3(t):
    return [t(i) for i in input()]

for _ in range(r1(int)):
    b = input()
    a = ''
    for i in range(0, len(b) + 1, 2):
        a += b[min(i, len(b) - 1)]
    print(a)