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".
[{"code": "tests = int(input())\nfor _ in range(tests):\n    n = input()\n    for i in range(len(n) // 2):\n        print(n[2 * i], end = '')\n    print(n[-1])\n", "passed": true, "time": 0.15, "memory": 14192.0, "status": "done"}, {"code": "from collections import Counter, defaultdict\n\nBS=\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\ndef to_base(s, b):\n    res = \"\"\n    while s:\n        res+=BS[s%b]\n        s//= b\n    return res[::-1] or \"0\"\nalpha = \"abcdefghijklmnopqrstuvwxyz\"\nfrom math import floor, ceil,pi\n\nt = int(input())\nfor i in range(t):\n    s = list(input())\n    ans = s[0]\n    for i in range(1, len(s), 2):\n        ans += s[i]\n    print(ans)", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "from sys import stdin, stdout, setrecursionlimit\nfor _ in range(int(input())):\n    s = input()\n    ans = s[0]\n    for i in range(1, len(s), 2):\n        ans += s[i]\n    print(ans)\n\n\n", "passed": true, "time": 0.15, "memory": 14156.0, "status": "done"}, {"code": "for i in range(int(input())):\n    s=input()\n    print(s[0]+s[1:-1:2]+s[-1])", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "import sys\nINF = 10**20\nMOD = 10**9 + 7\nI = lambda:list(map(int,input().split()))\nfrom math import gcd\nfrom math import ceil\nfrom collections import defaultdict as dd, Counter\nfrom bisect import bisect_left as bl, bisect_right as br\n\ndef solve():\n  s = input()\n  print(s[::2] + s[-1])\n\nt, = I()\nwhile t:\n  t -= 1\n  solve()", "passed": true, "time": 0.2, "memory": 14296.0, "status": "done"}, {"code": "for t in range(int(input())):\n    s = input()\n    print(''.join([s[i] for i in range(len(s)) if i%2==0]+[s[-1]]))", "passed": true, "time": 0.26, "memory": 14252.0, "status": "done"}, {"code": "T = int(input())\n\nfor t in range(T):\n    a = input()\n    b = a[0]\n    for i in range(1, len(a)-1, 2):\n        b += a[i]\n    b += a[-1]\n    print(b)\n", "passed": true, "time": 0.19, "memory": 14224.0, "status": "done"}, {"code": "import sys\nimport math\ndef II():\n\treturn int(sys.stdin.readline())\n\ndef LI():\n\treturn list(map(int, sys.stdin.readline().split()))\n\ndef MI():\n\treturn map(int, sys.stdin.readline().split())\n\ndef SI():\n\treturn sys.stdin.readline().strip()\nt = II()\nfor q in range(t):\n\ts = SI()\n\tans = \"\"\n\tfor i in range(0,len(s),2):\n\t\tans+=s[i]\n\tprint(ans+s[-1])", "passed": true, "time": 0.26, "memory": 14092.0, "status": "done"}, {"code": "for nt in range(int(input())):\n\ts = input()\n\tans = s[0]\n\tfor i in range(1,len(s),2):\n\t\tans+=s[i]\n\tprint (ans)", "passed": true, "time": 0.27, "memory": 14188.0, "status": "done"}, {"code": "t=int(input())\ncount=0\nwhile count<t:\n    count+=1\n    s=input()\n    ans=''\n    i=0\n    while i<len(s):\n        ans+=s[i]\n        i+=2\n    print(ans+s[-1])\n", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "t = int(input())\nfor gsdagsa in range(t):\n\ts = list(input())\n\tr = ''\n\tfor i in range(len(s)-1):\n\t\tif i % 2 == 0:\n\t\t\tr += s[i]\n\tr += s[-1]\n\tprint(r)", "passed": true, "time": 0.15, "memory": 14348.0, "status": "done"}, {"code": "from sys import stdin\n\ninput = stdin.readline\n\n\ndef main():\n    test = int(input())\n\n    for _ in range(test):\n        # n = int(input())\n        # l = [int(i) for i in input().split(\" \")]\n        # n,k = [int(i) for i in input().split(\" \")]\n        # a,b,c,d = [int(i) for i in input().split(\" \")]\n        #\n        # l = []\n        # l = [int(i) for i in input().split(\" \")]\n        #\n        # for i in l:\n        #     print(i, end=' ')\n        # print()\n\n        s = input().strip()\n\n        ns = s[0]\n\n        for i in range(1, len(s)-1, 2):\n            ns += s[i]\n\n        ns += s[len(s)-1]\n        print(ns)\n\n\nmain()\n", "passed": true, "time": 0.22, "memory": 14376.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    a=input()\n    ans=''\n    ans+=a[0]+a[1]\n    for i in range(3,len(a),2):\n        ans+=a[i]\n    print(ans)", "passed": true, "time": 0.22, "memory": 14224.0, "status": "done"}, {"code": "for __ in range(int(input())):\n    a = input()\n    ans = a[0]\n    for i in range(1, len(a), 2):\n        ans += a[i]\n    print(ans)", "passed": true, "time": 0.15, "memory": 14092.0, "status": "done"}, {"code": "t = int(input())\nfor i in range(t):\n    a = list(input())\n    b = \"\"\n    for i in range(1,len(a),2):\n        b = b + a[i]\n    b = a[0] + b\n    print(b)", "passed": true, "time": 0.22, "memory": 14244.0, "status": "done"}, {"code": "T = int(input())\nfor _ in range(T):\n    s = input()\n    print(s[::2]+s[-1])\n", "passed": true, "time": 0.19, "memory": 14224.0, "status": "done"}, {"code": "\"\"\"\nAuthor: Q.E.D\nTime: 2020-06-16 09:36:16\n\"\"\"\nT = int(input())\nfor _ in range(T):\n    b = input()\n    a = b[0] + b[1:-1:2] + b[-1]\n    print(a)", "passed": true, "time": 0.19, "memory": 14080.0, "status": "done"}, {"code": "t=int(input())\nfor i in range(t):\n    a=input()\n    s=a[0]+a[1:len(a)-1:2]+a[-1]\n    print(s)", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "# @author \n\nimport sys\n\nclass AShortSubstrings:\n    def solve(self, tc=0):\n        for _ in range(int(input())):\n            b = input().strip()\n            print(''.join(b[i] for i in range(len(b)) if i % 2 == 0) + b[-1])\n\n\nsolver = AShortSubstrings()\ninput = sys.stdin.readline\n\nsolver.solve()\n", "passed": true, "time": 0.2, "memory": 14328.0, "status": "done"}, {"code": "t=int(input())\nfor _ in range(t):\n    s=input()\n    ans=s[0]\n    for i in range(1,len(s),2):\n        ans+=s[i]\n    print(ans)", "passed": true, "time": 0.15, "memory": 14300.0, "status": "done"}, {"code": "\nimport sys\nsys.setrecursionlimit(10000)\n# default is 1000 in python\n\n\nt = int(input())\n# t = 1\n\nfor _ in range(t):\n\tb = input()\n\ta = b[0]\n\tfor i in range(1,len(b)-1,2):\n\t\ta += b[i]\n\ta += b[-1]\n\tprint(a)\n\n\n\n# try:\n\t# raise Exception\n# except:\n\t# print(\"-1\")\n\t\n\n# thenos.sort(key=lambda x: x[2], reverse=True)\n\n# int(math.log(max(numbers)+1,2))\n\n# 2**3 (power)\n\n# a,t = (list(x) for x in zip(*sorted(zip(a, t))))\n\n# to copy lists use .copy()\n\n# pow(p, si, 1000000007) for modular exponentiation\n\n# my_dict.pop('key', None)\n# This will return my_dict[key] if key exists in the dictionary, and None otherwise.\n\n\n\n", "passed": true, "time": 0.15, "memory": 14172.0, "status": "done"}, {"code": "t = int(input())\nfor i in range(t):\n    s = input()\n    res=s[0]\n    for i in range(1,len(s)-1,2):\n        res+=s[i]\n    res+=s[-1]\n    print(res)\n\n", "passed": true, "time": 0.15, "memory": 14200.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    s = input()\n\n    print(s[0] + s[1:-1][::2] + s[-1])\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "from sys import stdin\nfrom collections import defaultdict as dd\nfrom collections import deque as dq\nfrom collections import Counter\nimport itertools as it\nfrom math import sqrt, log, log2, ceil, floor\nfrom fractions import Fraction\n\nt = int(input())\nfor _ in range(t):\n    s = input()\n    ans = ''\n    for i in range(0, len(s), 2):\n        ans += s[i]\n    ans += s[-1]\n    print(ans)\n# n, m = map(int, input().split())\n# nums = list(map(int, stdin.readline().split()))\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "import sys\nimport math\nfrom math import factorial as f\nfrom collections import defaultdict as dd\nmod=1000000007\nT=1\nT=int(sys.stdin.readline())\nfor _ in range(T):\n    s=input()\n    ans=''\n    for i in range(0,len(s),2):\n        ans+=s[i]\n    print(ans+s[-1])\n        \n", "passed": true, "time": 0.23, "memory": 14128.0, "status": "done"}]