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".

Source: codeforces | Difficulty: EASY
Tags: String algorithms

Implementation


Solutions:
for _ in range(int(input())):
	b = list(input())
	a = [b[0]]
	n = len(b)
	i = 1
	while i < n:
		a.append(b[i])
		i += 2
	print(*a, sep='')


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


n = int(input())
a = []
for i in range(n):
	a.append(input())

def calc(x):
	s = list(x)
	arr = []
	for i in range(0, len(s), 2):
		arr.append(s[i])
	if len(s) % 2 == 0:
		arr.append(s[-1])
	print(''.join(arr))
for i in a:
	calc(i)


n = int(input())
for i in range(n):
	l = []
	k = input()
	for i in range(0, len(k), 2):
		b = k[i:i + 2]
		if i == 0:
			l.append(b)
		else:
			l.append(b[-1])
	print(''.join(l))


import math
import random
import sys
import time
t = int(input())
while t > 0:
	t = t - 1
	s = input()
	print(s[0], end='')
	for c in range(1, len(s), 2):
		print(s[c], end='')
	print()


for _ in range(int(input())):
	s = list(input())
	for i in range(0, len(s) - 1, 2):
		print(s[i], end='')
	print(s[len(s) - 1])


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


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


n = int(input())
for i in range(n):
	st = input()
	l = st[0]
	for i in range(1, len(st), 2):
		l = l + st[i]
	print(l)


t = int(input())
for i in range(0, t):
	a = input()
	x = []
	string = ''
	if len(a) == 2:
		x = a
	else:
		x.append(a[0])
		for i in range(1, len(a)):
			if i % 2 == 0:
				i += 1
			else:
				x.append(a[i])
	print(string.join(x))


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


t = int(input())
while t:
	t -= 1
	s = input()
	x = len(s)
	if x == 2:
		print(s)
	else:
		start = s[0]
		end = s[-1]
		pro = ''
		for i in range(1, x - 1):
			if i % 2 == 0:
				pro += s[i]
		ans = start + pro + end
		print(ans)


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
N = 5 * 10 ** 5 + 7
for _ in range(I()):
	s = S()
	a = s[0]
	for i in range(1, len(s), 2):
		a += s[i]
	print(a)


t = int(input())
for i in range(t):
	n = input()
	a = []
	b = []
	for j in n:
		a.append(j)
	k = 0
	while k < len(a):
		if k % 2 == 0:
			b.append(a[k])
		k += 1
	b.append(a[len(a) - 1])
	x = ''.join(map(str, b))
	print(x)


t = int(input())
for _ in range(t):
	b = input()
	final_string = b[:2]
	for i in range(3, len(b), 2):
		final_string += b[i]
	print(final_string)


import math
from collections import defaultdict, Counter, deque
INF = float('inf')

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def primeFactor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i ** 2 <= n:
		if n % i == 0:
			return i
		i += 1
	return n

def main():
	s = input()
	n = len(s)
	res = s[0]
	i = 1
	while i < n - 1:
		res += s[i]
		i += 2
	res += s[-1]
	print(res)
t = int(input())
for _ in range(t):
	main()


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


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


n = int(input())
for i in range(n):
	s = input()
	s1 = s[:2]
	for j in range(3, len(s) - 1, 2):
		s1 += s[j]
	if len(s) != 2:
		s1 += s[-1]
	print(s1)


for _ in range(int(input())):
	lst = list(input())
	print(''.join(lst[::2]) + lst[-1])


class substring:

	def __init__(self):
		self.str = input()

	def solve(self):
		print(self.str[:2], end='')
		i = 3
		while i < len(self.str):
			print(self.str[i], end='')
			i += 2
		print()
for i in range(int(input())):
	obj = substring()
	obj.solve()


for _ in range(int(input())):
	st = input()
	flag = st[:2]
	i = 3
	while i < len(st):
		flag += st[i]
		i += 2
	print(flag)


for _ in range(int(input())):
	s = input()
	x = list(s)
	if len(s) <= 2:
		print(s)
	else:
		e = []
		e.append(s[0])
		for i in range(1, len(x), 2):
			e.append(x[i])
		print(*e, sep='')


import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque
from collections import defaultdict

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def da():
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, m, a)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans

def to_zero(n, s):
	lst = s[0]
	ans = []
	for i in range(n):
		if lst == s[i]:
			continue
		elif lst == '0':
			lst = '1'
			ans.append(i)
		else:
			lst = '0'
			ans.append(i)
	if lst == '1':
		ans.append(n)
	return ans
for _ in range(int(input())):
	s = input()
	new = s[0] + s[1]
	for i in range(3, len(s), 2):
		new += s[i]
	print(new)


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(''.join((str(k) for k in ans)))


t = int(input())
for tt in range(t):
	b = input()
	a = []
	i = 0
	while i < len(b):
		if i != 0 and i % 2 == 0:
			i = i
		else:
			a.append(b[i])
		i = i + 1
	c = ''
	d = c.join(a)
	print(d)


t = int(input())
for i in range(t):
	b = input()
	l = ''.join([b[j] for j in range(0, len(b), 2)])
	print(l + b[-1])


def fun(s):
	if len(s) < 4:
		return s
	toPrint = s[0]
	for i in range(1, len(s), 2):
		toPrint += s[i]
	return toPrint
for i in range(int(input())):
	s = input()
	ans = fun(s)
	print(ans)


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


t = int(input())
while t > 0:
	t -= 1
	s = input()
	ans = []
	if len(s) == 2:
		ans = s
	else:
		for i in range(0, len(s), 2):
			ans.append(s[i])
		ans.append(s[len(s) - 1])
	print(''.join(ans))


a = int(input(''))
i = 0
b = []
while i < a:
	b.append(input(''))
	i = i + 1
for word in b:
	x = word[0]
	if len(word) == 2:
		x = x
	elif len(word) > 2:
		j = 1
		p = (len(word) + 2) / 2 - 1
		while j < p:
			x = x + word[2 * j]
			j = j + 1
	x = x + word[len(word) - 1]
	print(x)


n = int(input())
for z in range(n):
	b = input()
	r = ''
	if len(b) == 2:
		print(b)
	else:
		r = r + b[0]
		for i in range(len(b)):
			if i % 2 == 1:
				r = r + b[i]
		print(r)


for _ in range(int(input())):
	s = input()
	f = 0
	p = s[0]
	for i in s:
		if f:
			p += i
		f = 1 - f
	print(p)


for i in range(int(input())):
	b = input()
	print(b[0], end='')
	for j in range(1, len(b) - 1, 2):
		print(b[j], end='')
	print(b[-1])


t = int(input())
for j in range(t):
	n = input()
	n_splited = [char for char in n]
	result = []
	result.append(n_splited[0])
	for i in range(1, int(len(n_splited) / 2)):
		result.append(n_splited[i * 2])
	result.append(n_splited[len(n_splited) - 1])
	for i in result:
		print(i, end='')
	print()


t = int(input())
for _ in range(t):
	a = input()
	res = ''
	for letter in a[::2]:
		res += letter
	res += a[-1]
	print(res)


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
for ii in range(int(input())):
	b = input()
	n = len(b)
	if len(b) == 2:
		print(b)
	else:
		g = 1
		ans = []
		i = 0
		while i < n - 1:
			s1 = b[i]
			s2 = b[i + 1]
			if i == 0:
				ans.append(s1)
				ans.append(s2)
			else:
				ans.append(s2)
			i += 2
		for i in ans:
			print(i, end='')
		print()


t = int(input())

def b(s):
	return s[::2] + s[len(s) - 1]
while t > 0:
	s = input()
	print(b(s))
	t -= 1


for _ in range(int(input())):
	b = input()
	a = [b[0]]
	for i in range(1, len(b) - 1, 2):
		a.append(b[i])
	a.append(b[-1])
	print(''.join(a))


n = int(input())

def shrink_string(string):
	lst = list(string)
	new_string = ''
	for i in range(len(lst)):
		if i % 2 != 0 and i != len(lst) - 1:
			continue
		else:
			new_string += lst[i]
	return new_string
string_lst = list()
for i in range(n):
	string_lst.append(input())
for i in string_lst:
	print(shrink_string(i))


n = int(input())
a = []
i = int()
for j in range(n):
	b = input()
	a.append(b[0])
	a.append(b[1])
	for i in b[3::2]:
		a.append(i)
	print(''.join(a))
	a.clear()


import os
import sys
debug = True
if debug and os.path.exists('input.in'):
	input = open('input.in', 'r').readline
else:
	debug = False
	input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
test_count = int(input())
for t in range(test_count):
	if debug:
		print('Test Case #', t + 1)
	b = input().strip()
	a = b[0::2] + b[-1]
	print(a)


for _ in range(0, int(input())):
	a = input()
	if len(a) == 2:
		print(a)
	else:
		x = ''
		for i in range(0, len(a), 2):
			x = x + a[i]
		x = x + a[len(a) - 1]
		print(x)


n = int(input())
s = ['0'] * n
for i in range(n):
	s[i] = input()
	k = list(s[i])
	if len(s[i]) % 2 == 0:
		for j in range(2, len(s[i]), 2):
			k[j] = '0'
	else:
		for j in range(2, len(s[i]) + 1, 2):
			k[j] = '0'
	for j in range(k.count('0')):
		k.remove('0')
	s[i] = ''.join(k)
for i in range(n):
	print(s[i])


q = int(input())
for test in range(q):
	x = input()
	a = x[0] + x[1:-1:2]
	y = a + x[-1]
	print(y)


t = int(input())
while t > 0:
	s = list(input())
	k = len(s) - 2
	p = s[:k]
	s1 = ''
	s2 = s[k:]
	for i in range(k):
		if i % 2 == 0:
			s1 += s[i]
	s2 = ''.join(s2)
	s2 = str(s2)
	print(s1 + s2)
	t -= 1


t = int(input())
for i in range(t):
	b = input()
	d = ''
	if len(b) == 2:
		print(b)
	else:
		for j in range(len(b)):
			if j % 2 == 0:
				d += b[j]
		print(d + b[-1])


t = int(input())
while t > 0:
	b = input()
	c = 0
	a = ''
	while c < len(b) - 1:
		if b[c] != b[c + 1]:
			a = a + b[c]
		else:
			a = a + b[c]
			c = c + 1
		c = c + 1
	a = a + b[len(b) - 1]
	print(a)
	t = t - 1


import math
from io import BytesIO, IOBase
import sys
import os

def Iint():
	return int(input())

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

def Imap():
	return map(int, input().split())

def Plist(li, s=' '):
	print(s.join(map(str, li)))

def main():
	t = Iint()
	for _ in range(t):
		s = input()
		s = [si for (i, si) in enumerate(s) if i % 2 == 0] + [s[-1]]
		Plist(s, '')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


def short(n):
	for i in range(n):
		k = input()
		ans = ''
		ans += k[0]
		for i in range(len(k)):
			if i % 2 != 0:
				ans += k[i]
		print(ans)
n = int(input())
short(n)


x = int(input())
for i in range(x):
	s = input()
	for i in range(0, len(s) - 1, 2):
		print(s[i], end='')
	print(s[len(s) - 1])


test = int(input())
while test > 0:
	test -= 1
	s = input()
	if len(s) == 2:
		print(s)
	else:
		new = ''
		n = len(s)
		new += s[0]
		for i in range(1, n - 1, 2):
			new += s[i]
		new += s[n - 1]
		print(new)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	s = input()
	ans = s[0] + s[1:-1:2] + s[-1]
	print(ans)


import sys
t = int(input())
for j in range(t):
	s = input()
	if len(s) > 2:
		sa = s[0] + s[1]
		for i in range(2, len(s)):
			if i % 2 == 0:
				continue
			else:
				sa = sa + s[i]
		print(sa)
	else:
		print(s)


for _ in range(int(input())):
	a = input()
	count = a[0] + a[1::2]
	print(count)


n = int(input())
for i in range(n):
	s = input()
	res = s[:2]
	for i in range(2, len(s)):
		if i % 2 != 0:
			res = res + s[i]
	print(res)


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


number_test = int(input())
lista = []
for test in range(number_test):
	string = input()
	lista.append(string[::2] + string[-1])
for i in lista:
	print(i)


t = int(input())
while t:
	a = input()
	print(a[0::2] + a[-1])
	t -= 1


t = int(input())
for _ in range(t):
	s = input()
	temp = []
	temp.append(s[0])
	if len(s) > 2:
		i = 1
		while i < len(s) - 1:
			if s[i + 1] == s[i]:
				temp.append(s[i])
				i += 2
			else:
				i = i + 1
		temp.append(s[len(s) - 1])
		for i in range(len(temp)):
			print(temp[i], end='')
		print()
	elif len(s) == 2:
		print(s)


for _ in range(int(input())):
	b = input()
	ans = b[0]
	for x in range(1, len(b) - 1):
		if x & 1:
			ans = ans + b[x]
	ans = ans + b[len(b) - 1]
	print(ans)


t = int(input())
for i in range(t):
	s = input()
	e = s[len(s) - 2:]
	s = s[:len(s) - 2]
	for j in range(len(s)):
		if j % 2 == 0:
			print(s[j], end='')
	print(e)


out = ''
for i in range(int(input())):
	a = ''
	b = list(input())
	first = b[0]
	last = b[-1]
	b.pop(0)
	b.pop(-1)
	if len(b) >= 2:
		for i in range(0, len(b)):
			if i % 2 == 0:
				a += b[i]
	a = first + a + last
	out += a + '\n'
print(out)


t = int(input())
for we in range(t):
	s = input()
	y = s[0]
	i = 1
	n = len(s)
	while i < n - 1:
		y += s[i]
		i += 2
	y += s[-1]
	print(y)


def solve():
	for _ in range(int(input())):
		s = list(input())
		n = len(s)
		if n == 2:
			print(''.join(s))
			continue
		r = []
		r.append(s[0])
		for i in range(1, n - 1, 2):
			r.append(s[i])
		r.append(s[-1])
		print(''.join(r))
solve()


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


t = int(input())
for j in range(0, t):
	s = input()
	n = len(s)
	print(s[0], end='')
	g = 1
	for i in range(1, n):
		if s[i] != s[i - 1]:
			print(s[i], end='')
			g = 0
		elif g == 1:
			print(s[i], end='')
			g = 0
		else:
			g = 1
	print(' ')


Q = int(input())
for q in range(Q):
	s = input()
	ans = s[0]
	for i in range(1, len(s) // 2):
		ans += s[i * 2]
	print(ans + s[-1])


t = int(input())
while t:
	s = input()
	for x in range(len(s)):
		if x % 2 == 0:
			print(s[x], end='')
	print(s[-1])
	t -= 1


m = int(input())
for i in range(m):
	a = input()
	for i in range(0, len(a) - 1, 2):
		print(a[i], end='')
	print(a[len(a) - 1])


def string(l):
	i = 0
	L = []
	while i < len(l):
		L.append(l[i:i + 2])
		i += 2
	s = L[0]
	for i in L[1:len(L)]:
		s += i[1]
	return s
n = int(input())
list = []
for i in range(n):
	list.append(str(input()))
for i in list:
	print(string(i))


t = int(input())
for i in range(t):
	s = input()
	a = s[0]
	n = len(s)
	b = s[n - 1]
	j = 1
	l = []
	while j < n - 1:
		l.append(s[j])
		j = j + 2
	print(a, end='')
	for j in range(len(l)):
		print(l[j], end='')
	print(b)


try:
	n = int(input())
	while n > 0:
		a = []
		st = input().rstrip()
		if len(st) == 2:
			print(st)
		else:
			for i in range(0, len(st) - 2, 2):
				b = st[i]
				a.append(b)
			a.append(st[-2])
			a.append(st[-1])
			c = ''
			for i in a:
				c = c + str(i)
			print(c)
			n = n - 1
except EOFError:
	pass


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


t = int(input())
for _ in range(t):
	s = input()
	if len(s) == 2:
		print(s)
	else:
		print(s[:2] + s[3::2])


t = int(input())
for _ in range(t):
	s = input()
	l = list(s)
	i = 1
	while i < len(l) - 1:
		if l[i] == l[i + 1]:
			l.pop(i)
		i += 1
	print(''.join(l))


n = int(input())
for _ in range(n):
	s = input()
	if len(s) == 2:
		print(s)
	else:
		ans = [s[i] for i in range(0, len(s), 2)]
		ans = ''.join(ans)
		ans += s[-1]
		print(ans)


for _ in range(int(input())):
	n = input()
	print(n[0] + n[1:len(n) - 1:2] + n[-1])


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


import math
for w in range(int(input())):
	let = list(input())
	if len(let) == 2:
		print(''.join(let))
	else:
		rep = [let[i] for i in range(3, len(let), 2)]
		print(let[0] + let[1] + ''.join(rep))


from sys import stdin
for _ in range(int(stdin.readline())):
	b = stdin.readline().strip()
	a = b[0]
	for i in range(1, len(b) - 1, 2):
		a += b[i]
	a += b[len(b) - 1]
	print(a)


t = int(input())
for i in range(0, t):
	a = input().strip()
	b = a[0:2]
	for j in range(3, len(a)):
		if j % 2 != 0:
			b += a[j]
	print(b)


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


n = int(input())
for i in range(n):
	s = input()
	a = []
	a.append(s[0])
	j = 2
	while j < len(s) - 1:
		if s[j] == s[j - 1]:
			a.append(s[j])
			j += 1
		j += 1
	a.append(s[-1])
	print(''.join(a))


t = int(input())
for _ in range(t):
	a = list(input())
	n = len(a)
	print(a[0], end='')
	for i in range(1, n, 2):
		print(a[i], end='')
	print()


test = int(input())
while test > 0:
	test -= 1
	s = input()
	t = 1
	ans = list()
	for i in range(len(s) - 1):
		if t == 1:
			ans.append(s[i])
		t = 1 - t
	ans.append(s[int(len(s) - 1)])
	print(*ans, sep='')


for _ in range(int(input())):
	s = input()
	list1 = [s[0]]
	c = 0
	for i in range(1, len(s)):
		if c % 2 != 0:
			c = 0
			continue
		else:
			list1.append(s[i])
			c = 1
	s = '' + ''.join(list1)
	print(s)


t = int(input())
while t:
	s = input()
	if len(s) == 2:
		print(s)
	else:
		li = []
		li.append(s[0])
		for i in range(1, len(s) - 1, 2):
			if s[i] == s[i + 1]:
				li.append(s[i])
		li.append(s[len(s) - 1])
		for i in li:
			print(i, end='')
		print()
	t -= 1


for k in range(int(input())):
	b = input()
	a = ''
	for k in range(0, len(b), 2):
		u = b[k:k + 2]
		if len(a) == 0:
			a += u
		elif u[0] == a[-1]:
			a += u[-1]
	print(a)


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


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


t = int(input())
output = []
for i in range(t):
	b = input()
	a = ''
	a += b[0]
	for j in range(1, len(b), 2):
		a += b[j]
	output.append(a)
for s in output:
	print(s)


a = int(input())
for i in range(a):
	n = list(input())
	c = len(n)
	lst = []
	lst.append(n[0])
	for i in range(1, c - 1, 2):
		lst.append(n[i])
	lst.append(n[c - 1])
	print(''.join(lst))


for _ in range(int(input())):
	string = input()
	result = ''
	result += string[0] + string[1]
	n = len(list(string))
	flag = False
	if n > 2:
		for i in string[2:]:
			if flag:
				result += i
				flag = False
			else:
				flag = True
	print(result)


t = int(input())
for _ in range(t):
	b = str(input())
	a = b[:2]
	i = 3
	while i < len(b):
		a += b[i]
		i += 2
	print(a)


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


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


for _ in range(int(input())):
	a1 = list(str(input()))
	a = a1[1:len(a1) - 1]
	a.append(0)
	ans = []
	i = 0
	while i < len(a) - 1:
		j = a[i]
		k = 0
		while j == a[i + 1]:
			i += 1
			k += 1
		ans += a[i] * ((k + 1) // 2)
		i += 1
	ans = [a1[0]] + ans
	ans = ans + [a1[len(a1) - 1]]
	for i in ans:
		print(i, end='')
	print()


for _ in range(int(input())):
	n = input()
	print(n[0], end='')
	for i in range(len(n)):
		if i % 2 == 1:
			print(n[i], end='')
	print()


n = int(input())
for _ in range(n):
	s = input()
	if len(s) == 2:
		print(s)
		continue
	ans = ''
	for i in range(len(s)):
		if i % 2 == 0:
			ans += s[i]
	ans += s[-1]
	print(ans)


n = int(input())
for i in range(n):
	a = input()
	b = len(a)
	if len(a) <= 2:
		print(a)
	else:
		print(a[0], end='')
		for j in range(1, b - 1, 2):
			print(a[j], end='')
		print(a[b - 1])


for t in range(int(input())):
	b = input()
	print(b[0] + b[1::2])


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


test = int(input())
for i in range(1, test + 1):
	ls = input()
	for j in range(0, len(ls), 2):
		print(ls[j], end='')
	if len(ls) % 2 == 0:
		print(ls[len(ls) - 1])
	else:
		print()


for i in range(int(input())):
	n = input()
	l = list(n)
	kl = [l[0], l[1]]
	for i in range(2, len(l), 2):
		if kl[-1] == l[i]:
			kl.append(l[i + 1])
		else:
			kl.append(l[i])
			kl.append(l[i + 1])
	print(''.join(kl))


t = int(input())
for a in range(t):
	s = input()
	r = s[:2]
	if len(s) == 2:
		print(r)
	else:
		for i in range(2, len(s)):
			if i % 2 != 0:
				r += s[i]
		print(r)


t = int(input())
for i in range(t):
	s = input()
	st = s[0:2]
	for j in range(3, len(s), 2):
		st += s[j]
	print(st)


import sys
import random
strInp = lambda : input().strip().split()
intInp = lambda : list(map(int, strInp()))
for t in range(int(input())):
	s = input()
	ans = ''
	for i in range(0, len(s) - 2, 2):
		ans += s[i]
	ans += s[-2:]
	print(ans)


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


for _ in range(0, int(input())):
	str1 = str(input())
	mylist = []
	mylist.append(str1[0])
	i = 1
	while i < len(str1) - 1:
		mylist.append(str1[i])
		i = i + 2
	mylist.append(str1[-1])
	str1 = ''.join(mylist)
	print(str1)


import sys
import math
import collections

def set_debug(debug_mode=False):
	if debug_mode:
		fin = open('input.txt', 'r')
		sys.stdin = fin

def int_input():
	return list(map(int, input().split()))
t = int(input())
for ti in range(1, t + 1):
	s = input()
	res = ''
	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())):
	string = input()
	res = string[0] + ''
	for i in range(1, len(string) - 1, 2):
		val = string[i] + string[i + 1]
		res += val[0]
	print(res + string[len(string) - 1])


n = int(input())
for i in range(n):
	word = input()
	ans = word[0:2]
	for j in range(3, len(word), 2):
		ans += word[j]
	print(ans)


import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
from math import *
import copy
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def li():
	return [int(x) for x in input().split()]

def fi():
	return int(input())

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def bo(i):
	return ord(i) - ord('a')
from copy import *
from bisect import *
from itertools import permutations
t = fi()
while t > 0:
	t -= 1
	s = si()
	n = len(s)
	a = ''
	for i in range(n):
		if i % 2 == 0:
			a += s[i]
	if n % 2 == 0:
		a += s[-1]
	print(a)


t = int(input())
for j in range(t):
	b = input()
	c = ''
	l = len(b)
	if l == 2:
		c = b
	else:
		c += b[0] + b[1]
		for i in range(3, l, 2):
			c += b[i]
	print(c)


s = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for i in range(t):
	n = input()
	for j in s:
		n = n[0] + n[1:len(n) - 1].replace(j + j, j) + n[len(n) - 1]
	print(n)


t = int(input())
for k in range(t):
	l = list(str(input()))
	ar = []
	for i in range(len(l)):
		if i < 2:
			ar.append(l[i])
		elif i % 2 != 0:
			ar.append(l[i])
	print(''.join(ar))


from collections import Counter

def func(s):
	output = [s[0]]
	for (idx, val) in enumerate(s):
		if idx % 2 != 0:
			output.append(val)
	return ''.join(output)

def main():
	t = int(input())
	output = map(func, [input() for i in range(t)])
	for i in output:
		print(i)
main()


t = int(input())
for _ in range(t):
	s = input()
	new = ''
	new += s[0:2]
	if len(s) >= 4:
		for i in range(3, len(s), 2):
			new += s[i]
	print(new)


for tt in range(int(input())):
	s = input()
	l = list(s)
	l1 = len(s)
	ans = []
	for i in range(0, l1 - 2, 2):
		ans.append(l[i])
	ans.append(l[l1 - 2])
	ans.append(l[l1 - 1])
	print(''.join(ans))


for _ in range(int(input())):
	k = str(input())
	print(k[0], end='')
	i = -1
	while i < len(k) - 2:
		i += 2
		print(k[i], end='')
	print()


n = int(input())
for i in range(n):
	string = input()
	ret = ''
	for i in range(0, len(string), 2):
		ret += string[i]
	if len(string) % 2 == 0:
		ret += string[-1]
	print(ret)


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


t = int(input())
for i in range(t):
	s = input()
	f = s[0]
	l = s[-1]
	i = 1
	new = ''
	while i < len(s) - 2:
		new += s[i]
		i += 2
	new = f + new + l
	print(new)


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


from collections import defaultdict

def read_list():
	return list(map(int, input().split(' ')))

def print_list(l):
	print(' '.join(map(str, l)))
N = int(input())
for _ in range(N):
	s = input()
	res = s[::2] + s[-1]
	print(res)


for _ in range(int(input())):
	a = list(input())
	w = a[0]
	for i in range(1, len(a) - 1, 2):
		w += a[i]
	w += a[-1]
	print(''.join(w))


n = int(input())
for _ in range(n):
	arr = list(map(str, input().strip()))
	brr = []
	for i in range(0, len(arr), 2):
		brr += [arr[i]]
	brr += [arr[-1]]
	print(''.join(brr))


word = []
whole = []
t = int(input())
for i in range(t):
	word.clear()
	x = input()
	y = list(x)
	word.append(y[0])
	for z in range(1, len(y)):
		if z % 2 != 0:
			word.append(y[z])
	if len(y) - 1 % 2 == 0:
		word.append(y[len(y) - 1])
	part = ''.join(word)
	whole.append(part)
print(*whole, sep='\n')


for _ in range(int(input())):
	s = input()
	n = len(s)
	print(s[0:2], end='')
	for i in range(3, n, 2):
		print(s[i], end='')
	print()


t = int(input())
while t >= 1:
	s = input()
	ans = ''
	ans += s[0]
	for i in range(1, len(s) - 2):
		if i % 2 != 0:
			ans += s[i]
	ans += s[-1]
	print(ans)
	t -= 1


try:
	t = int(input())
	while t:
		b = input()
		l = len(b)
		i = 3
		y = b[:2]
		while i < l:
			y += b[i]
			i += 2
		print(y)
		t -= 1
except:
	pass


nhv = int(input())
for i in range(nhv):
	shv = input()
	chv = ''
	if len(shv) == 2:
		chv = chv + shv
	else:
		chv = chv + shv[:2]
		for i in range(3, len(shv), 2):
			chv = chv + shv[i]
	print(chv)


t = int(input())
for i in range(t):
	s = input()
	ans = s[0]
	for j in range(1, int(len(s) / 2)):
		ans += str(s[2 * j])
	ans += str(s[len(s) - 1])
	print(ans)


def main(s):
	return s[::2] + s[-1]
n = int(input())
for _ in range(n):
	print(main(input()))


for _ in range(int(input())):
	s = input()
	s = list(s)
	n = len(s)
	ans = ''
	for i in range(n):
		if i == n - 1:
			ans += s[i]
			break
		if i % 2 == 1 and s[i] != '-':
			s[i + 1] = '-'
		if s[i] != '-':
			ans += s[i]
	print(ans)


t = int(input())
for i in range(t):
	output = ''
	b = input()
	output = b[::2] + b[-1]
	print(output)


a = int(input())
for p in range(0, a):
	b = str(input())
	leng = len(b)
	count = 2
	if leng <= 2:
		print(b)
	else:
		b = list(b)
		while True:
			leng = len(b)
			if count + 1 < leng:
				if count + 1 == leng - 1:
					b.pop(count)
				else:
					b.pop(count)
					b.pop(count)
				count += 2
			else:
				b = str(b)
				b = b[1:-2]
				b = b.replace("'", '')
				b = b.replace(',', '')
				b = b.replace(' ', '')
				print(b)
				break


n = int(input())
tests = [input() for _ in range(n)]
tests = [test[0] + test[1::2] for test in tests]
[print(_) for _ in tests]


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


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


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


numCases = int(input())
for i in range(numCases):
	curS = input()
	ct = 0
	out = ''
	for ct in range(len(curS) // 2):
		if ct % 2 == 0:
			curD = curS[ct * 2:ct * 2 + 2]
			out += curD
	if len(curS) % 4 == 0:
		out += curS[-1]
	print(out)


import sys
input = sys.stdin.readline
t = int(input())
for r in range(t):
	s = input().strip('\n')
	ans = s[0]
	n = len(s)
	for i in range(1, n - 1, 2):
		ans += s[i]
	ans += s[n - 1]
	print(ans)


def split(word):
	return list(word)
num_tc = int(input())
tc = int(num_tc)
outs = []
while tc:
	word = str(input())
	chars = list(split(word))
	size = len(chars)
	i = 1
	recomined = chars[0]
	if len(chars) == 2:
		recomined = recomined + chars[i]
	while i < size - 1 and (not len(chars) == 2):
		if chars[i] == chars[i + 1]:
			recomined = recomined + chars[i]
			i = i + 2
		else:
			recomined = recomined + chars[i]
			i = i + 1
	if i == size - 1 and (not len(chars) == 2):
		recomined = recomined + chars[i]
	elif i >= size and (not len(chars) == 2):
		recomined = recomined + chars[i - 1]
	print(recomined)
	tc = tc - 1


for i in range(int(input())):
	s = input()
	a = len(s)
	j = 0
	for i in range(a):
		print(s[j], end='')
		i += 2
		j += 2
		if j > a - 1:
			break
	print(s[-1])


n = int(input())
while n:
	s = input()
	final = ''
	if len(s) == 2:
		print(s)
	else:
		for i in range(0, len(s), 2):
			final += s[i]
		final += s[-1]
		print(final)
	n -= 1


for i in range(int(input())):
	b = input()
	a = b[0]
	d = b[-1]
	if len(b) == 2:
		print(b)
		continue
	b = b[1:-1]
	for j in range(0, len(b), 2):
		a += b[j]
	print(a + d)


n = int(input())
for _ in range(n):
	s = [i for i in input()]
	l = []
	for i in range(0, len(s), 2):
		if i == 0 or i == len(s) - 1:
			l.append(s[i])
		else:
			l.append(s[i])
	l.append(s[len(s) - 1])
	for i in range(len(l)):
		print(l[i], end='')
	print()


n = int(input(''))
for i in range(n):
	s = str(input(''))
	if len(s) <= 2:
		print(s)
	else:
		ip = list(s)
		del ip[2::2]
		op = ''.join(ip)
		print(op)
exit()


t = int(input())
for cases in range(t):
	s = input()
	l = [item for item in s]
	ans = []
	if len(l) == 2:
		print(s)
	elif set(l) == 1:
		print(s[0:len(l) / 2])
	else:
		ans.append(l[0])
		for i in range(1, len(l) - 1):
			if i % 2 == 0:
				ans.append(l[i])
		ans.append(l[-1])
		print(''.join(ans))


t = int(input())
bList = []
for temp in range(t):
	bList.append(str(input()))

def solve(inString):
	temp = ''
	for k in range(0, len(inString), 2):
		sub = inString[k:k + 2]
		if k < len(inString) - 2:
			temp += sub[0]
		else:
			temp += sub
	return temp
for i in bList:
	print(solve(i))


import collections

def read():
	return input().strip()

def readInt():
	return int(input().strip())

def readList():
	return list(map(int, input().strip().split()))

def solve(s):
	ans = [s[0]]
	n = len(s)
	for i in range(1, n, 2):
		ans.append(s[i])
	if n & 1:
		ans.append(s[n - 1])
	return ''.join(ans)
t = readInt()
for i in range(t):
	s = read()
	print(solve(s))


a = int(input())
for i in range(a):
	b = input()
	c = len(b)
	if c <= 2:
		print(b)
	else:
		print(b[0], end='')
		for k in range(1, c - 1, 2):
			print(b[k], end='')
		print(b[c - 1])


t = int(input())
for _ in range(t):
	a = input()
	print(a[:2] + a[3::2])


t = int(input())
for i in range(0, t):
	st = input()
	st1 = ''
	for j in range(0, len(st)):
		if j == 0 or j == len(st) - 1:
			st1 = st1 + st[j]
		elif j % 2 == 0:
			st1 = st1 + st[j]
	print(st1)


t = int(input())
for i in range(t):
	s = input()
	l = len(s)
	st = ''
	st = st + s[0]
	c = 1
	flag = 0
	for i in range(2, l):
		if s[i] == s[i - 1]:
			c += 1
			flag = 1
		else:
			flag = 0
			c = c // 2
			st = st + s[i - 1] * c
			c = 1
	if flag == 1:
		c = c - 1
		c = c // 2
		st = st + s[i - 1] * c
	st = st + s[-1]
	print(st)


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


for t in range(int(input())):
	s = input()
	f = [s[0]]
	c = 1
	for i in range(1, len(s)):
		c = c + 1
		if c == 1 or c == 2:
			f.append(s[i])
		elif c == 4:
			c = 0
	if len(s) / 2 % 2 == 0:
		f.append(s[-1])
		print(''.join(f))
	else:
		print(''.join(f))


t = int(input())
for i10 in range(t):
	s = input()
	x = len(s)
	for i in range(x):
		if i == 0 or i == x - 1 or i % 2 == 1:
			print(s[i], end='')
	print()


t = int(input())
for _ in range(t):
	ss = input()
	n = len(ss)
	if n <= 2:
		print(ss)
	else:
		a = ''
		i = 0
		while i < n:
			a += ss[i]
			i = i + 2
		a += ss[-1]
		print(a)


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


t = int(input())
for i in range(t):
	b = input()
	ans = ''
	for j in range(0, len(b), 2):
		ans += b[j]
	if len(b) % 2 == 0:
		ans += b[len(b) - 1]
	print(ans)


for i in range(int(input())):
	b = input()
	a = ''
	for i in range(0, len(b) + 1):
		if i % 2 == 0 and i != 0:
			pass
		else:
			a += b[i]
	print(a)


n = int(input())
for i in range(n):
	s = input()
	s1 = ''
	for j in range(1, len(s) - 1, 2):
		s1 += s[j]
	print(s[0] + s1 + s[len(s) - 1])


t = int(input())
for _ in range(t):
	n = input()
	lnth = len(n)
	ans = ''
	if lnth == 2:
		print(n)
	else:
		for i in range(0, lnth):
			if i == 0:
				ans = ans + n[i]
			elif i % 2 != 0:
				ans = ans + n[i]
		print(ans)


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


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def foo():
	st = insr()
	n = len(st)
	st1 = []
	ans = ''
	st1.append(st[0])
	for i in range(1, n - 1, 2):
		st1.append(st[i])
	st1.append(st[-1])
	for item in st1:
		ans += item
	print(ans)
t = inp()
for i in range(t):
	foo()


t = int(input())
for i in range(1, t + 1):
	b = input()
	k = len(b)
	a = b[0]
	x = 0
	while x <= k - 3:
		x = x + 2
		a = a + b[x]
	a = a + b[k - 1]
	print(a)


n = int(input())
k = ['' for i in range(n)]
x = 0
for i in range(n):
	s = input()
	j = 0
	while j + 1 < len(s):
		if s[j] == s[j + 1]:
			j += 1
		k[x] += s[j]
		j += 1
	k[x] += s[-1]
	x += 1
for i in k:
	print(i)


t = int(input())
while t != 0:
	s = input()
	for i in range(1, len(s) + 1):
		if i == len(s) - 1:
			break
		elif s[i] == s[i + 1]:
			s = s[:i] + s[i + 1:]
	print(s)
	t = t - 1


for i in range(int(input())):
	s = input()
	ans = ''
	ans += s[0] + s[1]
	i = 3
	while i < len(s):
		ans += s[i]
		i += 2
	print(ans)


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


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	s = input().strip()
	print(s[::2] + s[-1])


def solve(str):
	n = len(str)
	ans = [str[2 * i] for i in range(n // 2)]
	ans.append(str[-1])
	return ''.join(ans)
t = int(input())
for test in range(t):
	s = input()
	print(solve(s))


T = int(input())
for t in range(T):
	s = input()
	s1 = ''
	l = len(s)
	s1 = s[0] + s[1]
	i = 3
	prev = ''
	while i < l:
		s1 += s[i]
		if i + 2 <= l - 1:
			i += 2
		else:
			i += 1
	print(s1)


n = int(input())
ls = []
for i in range(n):
	q = ''
	s = input()
	q += s[0]
	for j in range(1, len(s) - 1, 2):
		q += s[j]
	q += s[len(s) - 1]
	ls.append(q)
for i in range(len(ls)):
	print(ls[i])


n = int(input())
for i in range(0, n):
	x = str(input())
	s = len(x)
	a = [0] * (int(s / 2) + 1)
	str2 = ''
	for j in range(0, s):
		if j % 2 == 0:
			a[int(j / 2)] = x[j]
	a[int(s / 2)] = x[s - 1]
	print(str2.join(a))


def main(s):
	s = list(s)
	i = 1
	res = s[0]
	while i != len(s) - 1:
		if s[i] == s[i + 1]:
			del s[i]
			res += s[i]
			i += 1
			continue
		res += s[i]
		i += 1
	res += s[-1]
	return res
n = int(input())
for i in range(n):
	x = input()
	print(main(x))


t = int(input())
for i in range(t):
	b = list(str(input()))
	ans = ''
	for j in range(0, len(b), 2):
		ans = ans + b[j]
	print(ans + b[-1])


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])


n = int(input())
lst = []
for _ in range(n):
	val = input()
	lst.append(val)
for i in lst:
	for j in range(0, len(i) - 1, 2):
		print(i[j], end='')
	print(i[-1])


t = int(input())
for i in range(t):
	str1 = input()
	val = 0
	ans = ''
	while val < len(str1):
		if val == 0 or val & 1:
			ans += str1[val]
		val += 1
	print(ans)


t = int(input())
for _ in range(t):
	b = str(input())
	a = ''
	i = 0
	while i < len(b):
		if i == 0:
			a += b[i]
			i += 1
		elif i == len(b) - 1:
			a += b[i]
			print(a)
			break
		elif b[i] == b[i + 1]:
			a += b[i]
			i += 2
		else:
			a += b[i]
			i += 1


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def solve(t):
	b = input().strip()
	res = b[0]
	for i in range(1, len(b), 2):
		res += b[i]
	return res

def main():
	tc = int(input().strip())
	for t in range(1, tc + 1):
		print(solve(t))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
while t:
	t -= 1
	s = input()
	result = ''
	if len(s) == 2:
		print(s)
	else:
		for i in range(0, len(s), 2):
			if len(result) >= 2:
				a = s[i + 1:i + 2]
				result += a
			else:
				a = s[i:i + 2]
				result += a
		print(result)


t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	b = input()
	sz = len(b)
	a = b[0] + b[1]
	for i in range(3, len(b), 2):
		a += b[i]
	print(a)


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 _ in range(int(input())):
	x = input()
	print(x[::2] + x[-1])


a = int(input())
for i in range(a):
	b = input()
	d = []
	c = len(b)
	if c == 2:
		print(b)
	else:
		k = 0
		for j in range(0, c):
			if k == 0:
				d.append(b[j])
				k = 1
			else:
				k = 0
		d.append(b[c - 1])
		print(''.join(d))


def Output_ans(string):
	ans = []
	ans.append(string[0])
	for i in range(1, len(string), 2):
		ans.append(string[i])
	return ''.join(ans)
count = int(input())
string = ['' for i in range(count)]
for i in range(0, count, 1):
	string[i] = input()
	print(Output_ans(string[i]))


t = int(input())
for i in range(t):
	b = str(input())
	a = []
	a.append(b[0])
	a.append(b[1])
	for j in range(3, len(b)):
		if j % 2 == 1:
			a.append(b[j])
	print(''.join(a))


import os
import sys
from io import BytesIO, IOBase
t = int(sys.stdin.readline())
for _ in range(t):
	n = input()
	length = len(n)
	result = str(n[0])
	i = 1
	while i < length - 1:
		if n[i] == n[i + 1]:
			result = result + n[i]
			i = i + 2
		else:
			result = result + n[i]
			i = i + 1
	result = result + n[-1]
	print(result)


def main():
	t = eval(input())
	list2 = []
	for i in range(t):
		b = input()
		app = ''
		for j in range(1, len(b) - 1, 2):
			if b[j] == b[j + 1]:
				app = app + b[j]
			else:
				app = app + b[j] + b[j + 1]
		answer = b[0] + app + b[len(b) - 1]
		list2.append(answer)
	for item in list2:
		print(item)
main()


for _ in range(int(input())):
	a = input()
	for i in range(len(a)):
		if not i or i % 2:
			print(a[i], end='')
	print()


n = int(input())
lst = []
for i in range(n):
	lst.append(list(input()))
for string in lst:
	word = [string[0], string[1]]
	if len(string) == 2:
		w = ''.join(word)
	else:
		for i in range(3, len(string), 2):
			word.append(string[i])
		w = ''.join(word)
	print(w)


for _ in range(int(input())):
	s = list(input())
	l = len(s)
	ls = []
	c = 3
	while c < l:
		ls.append(s[c])
		c = c + 2
	f = s[:2] + ls
	print(''.join(map(str, f)))


for l in range(int(input())):
	s = input()
	li = list(s)
	for i in range(0, len(li) - 1, 2):
		print(li[i], end='')
	print(li[len(li) - 1], end='')
	print()


n = int(input())
for i in range(n):
	a = input()
	print(a[:1] + a[1::2])


numInput = int(input())
for i in range(numInput):
	b = input()
	a = str(b[0])
	index = 1
	while index < len(b):
		a = a + b[index]
		index += 2
	print(a)


def solve(a):
	r = []
	for i in range(0, len(a), 2):
		r.append(a[i])
	r += [a[-1]]
	return ''.join(r)
t = int(input())
for _ in range(t):
	n = input()
	res = solve(n)
	print(res)


t = int(input())
for row in range(t):
	line = input()
	new_line = line[0:2]
	for i in range(3, len(line), 2):
		new_line += line[i]
	print(new_line)


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


n = int(input())
for i in range(n):
	b = input()
	if len(b) == 2:
		print(b)
	else:
		print(b[::2] + b[-1])


def main():
	t = int(input())
	for _ in range(t):
		b = input()
		a = b[0]
		for c in b[1:-2:2]:
			a += c
		a += b[-1]
		print(a)
main()


x = int(input())
for _ in range(x):
	arr = list(input())
	i = 1
	brr = ''
	while i < len(arr) - 1:
		if arr[i] == arr[i - 1]:
			arr.pop(i)
		i += 1
	print(''.join(arr))


n = int(input())
for i in range(n):
	str = input()
	r = str[:2]
	for i in range(2, len(str)):
		if i % 2 != 0:
			r = r + str[i]
	print(r)


t = int(input())
for i in range(t):
	string = str(input())
	vazio = ''
	if len(string) % 2 == 1:
		string += '1'
	vazio += string[0] + string[1]
	for a in range(2, len(string), 2):
		if string[a + 1] != '1':
			vazio += string[a + 1]
	print(vazio)


import math
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	result.append(n)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	s = input()
	s1 = s[0]
	for j in range(1, len(s), 2):
		s1 += s[j]
	print(s1)
t = int(input())
for i in range(0, t):
	main()


t = int(input())
while t:
	b = input()
	ans = b[0] + b[1]
	l = len(b)
	if l > 2:
		for i in range(3, l, 2):
			ans += b[i]
	print(ans)
	t -= 1


for _ in range(int(input())):
	s = input()
	ans = []
	ans.append(s[0])
	for i in range(1, len(s), 2):
		ans.append(s[i])
	print(''.join(ans))


t = int(input())
for _ in range(t):
	b = input()
	a = ''
	for i in range(len(b)):
		if i == 0:
			a += b[i]
		elif i == len(b) - 1:
			a += b[i]
		elif i % 2 == 1:
			a += b[i]
		else:
			continue
	print(a)


for t in range(int(input())):
	s = input()
	for i in range(len(s)):
		if i % 2 == 0 and i != 0:
			continue
		elif i == len(s) - 1:
			print(s[i])
		else:
			print(s[i], end='')


n = int(input())
s = []
for i in range(n):
	s.append(input())
for i in s:
	l = len(i)
	ss = i[0:2]
	for j in range(2, l):
		if j % 2 == 1:
			ss += i[j]
	print(ss)


t = int(input())
while t > 0:
	str1 = input()
	ans = str1[0]
	for i in range(1, len(str1) - 1, 2):
		ans += str1[i]
	ans += str1[len(str1) - 1]
	print(ans)
	t -= 1


n = int(input())
for i in range(0, n):
	s = str(input())
	output = ''
	output += s[0]
	output += s[1]
	j = 3
	while j < len(s):
		output += s[j]
		j += 2
	print(output)


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


t = int(input())
while t != 0:
	t -= 1
	s = str(input())
	s1 = s[0]
	for i in range(len(s)):
		if i % 2 == 0:
			continue
		else:
			s1 += s[i]
	print(s1)


from sys import stdin

def input():
	return stdin.readline().rstrip()
for _ in range(int(input())):
	b = input()
	if len(b) == 2:
		print(b)
	else:
		l = []
		for i in range(len(b) - 1):
			if (i + 1) % 2 == 0:
				l.append(b[i])
		print(b[0], *l, b[-1], sep='')


n = int(input())
for _ in range(0, n):
	string = input()
	ans = ''
	size = len(string)
	ans += string[0]
	i = 1
	while i < size - 1:
		if string[i] == string[i + 1]:
			ans += string[i]
			i += 2
		else:
			ans += string[i]
	ans += string[size - 1]
	print(ans)


n = int(input())
for i in range(n):
	string = input()
	if len(string) == 2:
		print(string)
	else:
		ans = ''
		ans += string[0]
		for j in range(2, len(string) - 1, 2):
			ans += string[j]
		ans += string[len(string) - 1]
		print(ans)


n = int(input())
for _ in range(n):
	s = input()
	k = s[1:]
	m = k[:-1]
	l = []
	for i in range(1, len(m), 2):
		if m[i - 1] == m[i]:
			l.append(m[i - 1:i])
	print(s[:1] + ''.join(map(str, l)) + s[-1:])


for i in range(int(input())):
	s = input()
	re = ''
	if len(s) % 2 == 0:
		i = 0
		while i < len(s):
			if i % 2 == 0:
				re = re + s[i]
			i += 1
		re = re + s[-1]
	else:
		i = 0
		while i < len(s):
			if i % 2 == 0:
				re = re + s[i]
			i += 1
		re = re + s[-1]
	print(re)


import sys
import math
input = sys.stdin.readline
from collections import deque
from queue import LifoQueue

def binary_search(a, n):
	L = 0
	R = len(a) - 1
	while L <= R:
		mid = L + (R - L) // 2
		if a[mid] == n:
			return mid
		elif a[mid] < n:
			L = mid + 1
		else:
			R = mid - 1
	return -1
for _ in range(int(input())):
	b = input()
	a = b[0]
	for i in range(1, len(b), 2):
		a += b[i]
	a += b[-1]
	print(a)


t = int(input())
while t:
	ss = ''
	s = input()
	if len(s) == 2:
		print(s)
	else:
		ss += s[0]
		for i in range(1, len(s) - 1, 2):
			ss += s[i]
		ss += s[-1]
		print(ss)
	t -= 1


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		B = input()
		a = [s for (i, s) in enumerate(B) if not i % 2]
		if not len(B) % 2:
			a += [B[-1]]
		print(''.join(a))
main()


def inpi():
	return int(input())

def inps():
	return str(input())

def inparr():
	return list(map(int, input().split()))
for _ in range(inpi()):
	s = inps()
	n = len(s)
	ans = s[0]
	for i in range(1, n - 1, 2):
		ans += s[i]
	print(ans + s[-1])


for _ in range(int(input())):
	s = input()
	temp = 2
	ans = ''
	for i in range(len(s)):
		if i == temp:
			temp += 2
			continue
		else:
			ans += s[i]
	print(ans)


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


for _ in range(int(input().strip())):
	s = input().strip()
	length = len(s)
	i = 0
	s1 = ''
	s1 = s1 + s[0:2]
	i = 2
	while i < length:
		temp = s[i:i + 2]
		s1 = s1 + temp[-1]
		i += 2
	print(s1)


for _ in range(int(input())):
	b = input()
	s = len(b)
	a = []
	for i in range(s - 1):
		if i % 2 != 0 or i == 0:
			c = b[i]
			a.append(c)
		else:
			continue
	a.append(b[s - 1])
	print(''.join((str(i) for i in a)))


n = int(input())
for i in range(n):
	a = input()
	l = len(a)
	str = ''
	str = a[0:2]
	for i in range(3, l, 2):
		str += a[i]
	print(str)


n = int(input())
for i in range(0, n):
	word = list(input())
	for i in range(0, len(word) - 1, 2):
		print(word[i], end='')
	print(word[-1])


t = int(input())
for i in range(t):
	s = input()
	a1 = []
	for i in range(0, len(s), 2):
		a = s[i:i + 2]
		a1.append(a)
	s1 = ''
	for i in range(len(a1) - 1):
		s1 = s1 + a1[i][0]
	s1 = s1 + a1[-1]
	print(s1)


production = True
import sys, math

def input(input_format=0, multi=0):
	if multi > 0:
		return [input(input_format) for i in range(multi)]
	else:
		next_line = sys.stdin.readline()
		if input_format >= 10:
			use_list = False
			input_format = int(str(input_format)[-1])
		else:
			use_list = True
		if input_format == 0:
			formatted_input = [next_line]
		elif input_format == 1:
			formatted_input = list(map(int, next_line.split()))
		elif input_format == 2:
			formatted_input = list(map(float, next_line.split()))
		elif input_format == 3:
			formatted_input = next_line.split()
		elif input_format == 4:
			formatted_input = (lambda x: [x[0], list(map(int, x[1:]))])(next_line.split())
		elif input_format == 5:
			formatted_input = (lambda x: [x[0], list(map(float, x[1:]))])(next_line.split())
		else:
			formatted_input = [next_line]
		return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format=0, newline=True):
	formatted_output = ''
	if output_format == 0:
		formatted_output = str(output_line)
	elif output_format == 1:
		formatted_output = ' '.join(map(str, output_line))
	elif output_format == 1:
		formatted_output = '\n'.join(map(str, output_line))
	print(formatted_output, end='\n' if newline else '')

def log(*args):
	if not production:
		print('$$$')
		print(*args)

def solve():
	b = input(10)
	f = b[0]
	t = 0
	for i in b[1:]:
		if t == 0:
			f += i
			t = 1
		else:
			t -= 1
			continue
	out(f)
	return
for i in range(input(11)):
	solve()


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


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


t = int(input())
for _ in range(t):
	word = input()
	for i in range(len(word)):
		if i % 2 == 0:
			print(word[i], end='')
	print(word[-1])


t = int(input())
for i in range(t):
	s = input()
	list1 = list(s)
	arr = []
	for j in range(0, len(s) - 1, 2):
		arr.append(list1[j])
	arr.append(list1[-1])
	listtostr = ''.join(map(str, arr))
	print(listtostr)


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


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)


t = int(input())
for _ in range(t):
	stri = input()
	s = list(stri)
	n = len(stri)
	if n == 2:
		print(stri)
	else:
		k = n // 2 - 1
		ans = ''
		ans = ans + s[0]
		for i in range(1, n, 2):
			ans = ans + s[i]
		print(*ans, sep='')


for t in range(int(input())):
	b = input()
	c = ''.join([x for (i, x) in enumerate(b[1:-1]) if i % 2 == 0])
	a = b[0] + c + b[-1]
	print(a)


for t in range(int(input())):
	n = input()
	m = ''
	m += n[0]
	for i in range(1, len(n), 2):
		m += n[i]
	print(m)


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


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


t = int(input())
for _ in range(t):
	s = str(input())
	if len(s) == 2:
		print(s)
	else:
		temp = ''
		temp += s[0]
		for i in range(1, len(s) - 1, 2):
			if s[i] == s[i + 1]:
				temp += s[i]
			else:
				temp += s[i] + s[i + 1]
		temp += s[-1]
		print(temp)


a = int(input())
for i in range(a):
	b = input()
	s = b
	i = 2
	while i < len(b):
		s = s[:i] + s[i + 1:]
		i = i + 1
	print(s)


for i in range(int(input())):
	s = input()
	ans = ''
	l = len(s)
	for i in range(0, len(s), 2):
		ans += s[i]
	if l % 2 == 0:
		print(ans + s[-1])
	else:
		print(ans)


for _ in range(int(input())):
	string = input()
	i = 1
	print(string[0], end='')
	while i < len(string) - 1:
		if string[i + 1] == string[i]:
			print(string[i], end='')
			i += 2
		else:
			print(string[i], end='')
			i += 1
	print(string[-1])


t = int(input())
for _ in range(t):
	n = input()
	m = ''
	i = 0
	while i < len(n) - 1:
		m = m + n[i]
		if n[i] == n[i + 1]:
			i = i + 1
		i = i + 1
	m = m + n[-1]
	print(m)


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

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

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')

def solve(b):
	n = len(b)
	a = [b[0]]
	for i in range(1, n // 2):
		a.append(b[i * 2])
	a.append(b[n - 1])
	return ''.join(a)

def main():
	for _ in range(ri()):
		b = rs()
		ws(solve(b))
main()


n1 = int(input())
for x in range(n1):
	s = input()
	fs = ''
	for y in range(0, len(s), 2):
		fs = fs + s[y]
	print(fs + s[len(s) - 1])


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


t = int(input())
for _ in range(t):
	B = input().strip()
	arr = [B[0]]
	for i in range(1, len(B) - 1, 2):
		arr.append(B[i])
	arr.append(B[-1])
	print(''.join(arr))


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


for i in range(int(input())):
	a = input()
	s = ''
	if len(a) % 4 == 0:
		for i in range(0, len(a), 4):
			s = s + a[i:i + 2]
		print(s + a[-1])
	if len(a) % 4 != 0:
		for i in range(0, len(a), 4):
			s = s + a[i:i + 2]
		print(s)


T = int(input())

def main():
	b = str(input())
	n = len(b)
	a = ''
	for i in range(0, n, 2):
		a += b[i]
	if n % 2 == 0:
		a += b[-1]
	return a
for _ in range(T):
	print(main())


for _ in range(int(input())):
	l = [x for x in input()]
	ans = ''
	ans += l[0]
	i = 1
	while i < len(l):
		ans += l[i]
		i += 2
	print(ans)


n = int(input())
for i in range(n):
	b = []
	a = input()
	if len(a) == 2:
		print(a)
	else:
		a = list(a.strip())
		b.append(a[0])
		for i in range(len(a)):
			if i % 2 == 1:
				b.append(a[i])
		print(''.join(b))


n = int(input())
for i in range(n):
	s = input()
	a = [s[0]]
	for j in range(len(s) // 2 - 1):
		a.append(s[j * 2 + 1])
	a.append(s[-1])
	print(*a, sep='')


t = int(input())
for _ in range(t):
	s = input()
	i = 2
	if len(s) > 2:
		for _ in range((len(s) - 2) // 2):
			s = s[:i] + s[i + 1:]
			i += 1
	print(s)


for i in range(int(input())):
	s = input()
	a = []
	i = 0
	while i < len(s) - 1:
		if s[i] == s[i + 1]:
			a.append(s[i])
			i = i + 1
		else:
			a.append(s[i])
		i = i + 1
	for j in range(len(a)):
		print(a[j], end='')
	print(s[-1])


def shortsubstring(s):
	data = list(s)
	output = ''
	i = 0
	nu = len(data)
	while i < nu - 3:
		output += data[i]
		i = i + 2
	output += data[nu - 2] + data[nu - 1]
	print(output)
nu = input()
data = []
for i in range(int(nu)):
	data.append(input())
for i in data:
	shortsubstring(i)


n = int(input())
for i in range(n):
	a = input()
	x = 0
	s = ''
	for i in a:
		x += 1
		if x % 2 != 0:
			s = s + i
	if x % 2 == 0:
		s = s + i
	print(s)


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


n = int(input())
for _ in range(n):
	b = list(input())
	for i in range(2, len(b), 2):
		b[i] = 0
	print(''.join([a for a in b if a != 0]))


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


for i in range(int(input())):
	string = input()
	for i in range(len(string)):
		if i % 2 == 0:
			print(string[i], end='')
	print(string[-1])


import sys
input = sys.stdin.readline
for T in range(int(input())):
	s = input()
	f = s[0]
	l = s[-1]
	n = len(s)
	res = ''
	for i in range(1, n - 1, 2):
		res += s[i]
	print(f + res + l)


t = int(input())
while t > 0:
	b = input()
	a = ''
	for (idx, itm) in enumerate(b):
		if (idx + 1) % 2 == 1 or idx + 1 == len(b):
			a += itm
	print(a)
	t -= 1


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


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


for _ in range(int(input())):
	s = input()
	l = list(s)
	l2 = [l[0]]
	for i in range(1, len(l)):
		if i % 2 != 0:
			l2.append(l[i])
	print(''.join(map(str, l2)))


for _ in range(int(input())):
	s = input()
	c = s[0]
	for i in range(1, len(s) - 1):
		if i % 2 != 0:
			c = c + s[i]
	c = c + s[len(s) - 1]
	print(c)


test = int(input())
for i in range(test):
	str1 = input()
	if len(str1) == 2:
		print(str1)
	else:
		final_str = ''
		for i in range(0, len(str1), 2):
			final_str += str1[i]
		final_str = final_str + str1[-1]
		print(final_str)


n = int(input())
for _ in range(n):
	s = str(input())
	ls = len(s)
	sr = s[0]
	for i in range(1, ls):
		if i % 2 != 0:
			sr += s[i]
		else:
			pass
	print(sr)


t = int(input())
for test in range(t):
	s = input()
	idx = 0
	newstr = ''
	newstr2 = ''
	t = s[-1]
	for letter in s:
		if idx % 2 == 0:
			newstr = newstr + s[idx]
		else:
			newstr2 = newstr2 + s[idx]
		idx += 1
	li = [i for i in newstr]
	li.append(t)
	str1 = ''.join(li)
	print(str1)


t = int(input())
for i in range(t):
	b = input()
	i = 0
	while i < len(b):
		if i == 0:
			print(b[0], end='')
			i += 1
		elif i == len(b) - 1:
			print(b[len(b) - 1], end='')
			i += 1
		else:
			print(b[i], end='')
			i += 2
	print()


l = []
for i in range(int(input())):
	l.append(input())
for i in l:
	s = i[1:-1]
	a = ''
	for j in range(0, len(s), 2):
		a += s[j]
	a = i[0] + a + i[-1]
	print(a)


for test in range(0, int(input())):
	s = input()
	ans = ''
	if len(s) > 2 and len(s) % 2 != 0:
		for i in range(0, len(s), 2):
			ans += s[i]
		print(ans)
	elif len(s) > 2 and len(s) % 2 == 0:
		for i in range(0, len(s), 2):
			ans += s[i]
		print(ans + s[-1])
	else:
		print(s)


for _ in range(int(input())):
	p = str(input())
	ps = [p[i] for i in range(1, len(p) - 1, 2)]
	ps2 = ''.join(ps)
	print(p[0] + ps2 + p[-1])


for _ in range(int(input())):
	string = input()
	print(''.join([string[i] for i in [0] + list(range(1, len(string), 2))]))


t = int(input())
for i in range(t):
	s = input()
	a = list(s)
	l = []
	j = 0
	if len(s) <= 2:
		print(s)
	else:
		while j < len(s):
			l.append(s[j])
			j = j + 2
		l.append(s[len(s) - 1])
		z = ''
		for k in l:
			z = z + k
		print(z)


for _ in range(int(input())):
	s = input()
	l = s[-1]
	s = s[:-1]
	k = ''
	for i in range(0, len(s), 2):
		k += s[i]
	k += l
	print(k)


for i in range(int(input())):
	s = input()
	temp = s[0]
	j = 0
	while j < len(s) - 2:
		temp += s[j + 2]
		j += 2
	if len(s) % 2 == 0:
		temp += s[len(s) - 1]
	print(temp)


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


t = int(input())
for i in range(t):
	s = input()
	l = len(s)
	if l <= 2:
		print(s)
	else:
		print(s[0], end='')
		for w in range(1, l - 1, 2):
			print(s[w], end='')
		print(s[l - 1])


for i in range(int(input())):
	o = input()
	k = ''
	for i in range(len(o)):
		if i % 2 == 0:
			k += o[i]
	print(k + o[-1])


def main():
	t = int(input())
	for i in range(t):
		s = input()
		ans = s[:2]
		for c in range(3, len(s), 2):
			ans += s[c]
		print(ans)
main()


n = int(input())
for i in range(n):
	b = input()
	a = str()
	for j in range(len(b)):
		if j == 0 or j == 1:
			a += str(b[j])
		elif j % 2 != 0:
			a += str(b[j])
		else:
			continue
	print(a)


import sys

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

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

def input():
	return sys.stdin.readline().strip()
mod = 10 ** 9 + 7
for _ in range(int(input())):
	s = input()
	i = 0
	res = ''
	while i < len(s):
		if i % 2 == 1:
			res += s[i]
			i += 1
		else:
			res += s[i]
		i += 1
	print(res)


t = int(input())
while t:
	b = input()
	print(b[0::2] + b[-1])
	t -= 1


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


x = int(input())
for i in range(x):
	a = list(input())
	if len(a) == 2:
		print(''.join(a))
	else:
		b = []
		for z in range(1):
			b.append(a[z])
		for j in range(2, len(a), 2):
			b.append(a[j])
		b.append(a[-1])
		print(''.join(b))


t = int(input())
while t:
	n = input()
	i = 0
	s1 = ''
	while i < len(n) - 1:
		if n[i] == n[i + 1]:
			s1 = s1 + n[i]
			i = i + 2
		else:
			s1 += n[i]
			i = i + 1
	if i == len(n) - 1:
		s1 += n[len(n) - 1]
	if i == len(n) and n[len(n) - 1] == n[len(n) - 2]:
		s1 += n[len(n) - 1]
	print(s1)
	t -= 1


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


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for i in range(INT()):
	s = input()
	ans = ''
	for i in range(len(s)):
		if i % 2 == 0:
			ans += s[i]
	ans += s[-1]
	print(ans)


import math
import os
import random
import re
import sys
n = int(input())
for x in range(n):
	s = input()
	s1 = s[1:len(s)]
	m = []
	for i in range(len(s1) // 2):
		if s1[2 * i] == s1[2 * i + 1]:
			m.append(s1[2 * i])
		else:
			m.append(s1[2 * i])
			m.append(s1[2 * i + 1])
	h = s[0] + ''.join(m) + s[-1]
	print(h)


for _ in range(int(input())):
	s = input()
	z = ''
	if len(s) == 2:
		z = z + s[:]
		print(z)
	else:
		for i in range(0, len(s), 2):
			if i == 0:
				z = z + s[i]
			elif i == len(s) - 2:
				z = z + s[i] + s[i + 1]
				break
			else:
				z = z + s[i]
		print(z)


t = int(input())
for s in range(t):
	string = input()
	array = []
	for i in string:
		array.append(i)
	l = len(array)
	rama = [array[0]]
	for i in range(l - 1):
		if i % 2 == 1:
			rama.append(array[i])
	rama.append(array[-1])
	for j in rama:
		print(j, end='')
	print()


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


test = int(input())
for i in range(test):
	s1 = input()
	l = []
	s = []
	for j in s1:
		l.append(j)
	k = 0
	while k < len(l):
		if k % 2 == 0:
			s.append(l[k])
		k += 1
	s.append(l[len(l) - 1])
	s2 = ''.join(map(str, s))
	print(s2)


n = int(input())
for x in range(n):
	str1 = input()
	str2 = ''.join(str1[0])
	for y in range(1, len(str1) - 1, 2):
		str2 += ''.join(str1[y])
	str2 += ''.join(str1[len(str1) - 1])
	print(str2)


n = input()
for i in range(int(n)):
	a = input()
	if len(a) > 2:
		print(a[0] + a[1:-1:2] + a[-1])
	else:
		print(a)


for i in range(int(input())):
	b = input()
	a = b[:2]
	for i in range(3, len(b), 2):
		a = a + b[i]
	print(a)


q = int(input())
for _ in range(q):
	s = input()
	d = ''
	n = len(s)
	for i in range(n):
		if i == 0 or i == n - 1:
			d += s[i]
		elif i % 2 == 1:
			d += s[i]
	print(d)


for _ in range(int(input())):
	S = input()
	res = S[0] + S[1:-1:2] + S[-1]
	print(res)


T = int(input())
for z in range(T):
	b = list(input())
	ans = ''
	i = 1
	ans += b[0]
	while i < len(b) - 2:
		if b[i] == b[i + 1]:
			ans += b[i]
			i += 2
		else:
			ans += b[i]
			i += 1
	ans += b[len(b) - 1]
	print(ans)


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


x = int(input())
for i in range(x):
	ans = ''
	s = input()
	ans += s[:2]
	for c in range(2, len(s)):
		if c % 2 == 1:
			ans += s[c]
	print(ans)


testcases = int(input())
while testcases > 0:
	testcases = testcases - 1
	string = str(input())
	if len(string) == 2:
		print(string)
		continue
	else:
		ans = string[0:2]
		for i in range(3, len(string), 2):
			ans = ans + string[i]
		print(ans)


T = int(input())

def getResult(S):
	l = []
	for i in range(0, len(S), 2):
		l.append(S[i])
	l.append(S[-1])
	a = ''
	for elem in l:
		a += str(elem)
	return a
for _ in range(T):
	S = input()
	ans = getResult(S)
	print(ans)


n = int(input())
for i in range(n):
	m = input()
	b = m[0]
	for j in range(len(m) // 2):
		b = b + m[2 * j + 1]
	print(b)


n = int(input())
while n > 0:
	s = input()
	t = ''
	l = len(s)
	for i in range(0, l, 2):
		t += s[i]
	t += s[l - 1]
	print(t)
	n = n - 1


t = int(input())
for j in range(t):
	stri = input()
	stri1 = ''
	for i in range(len(stri)):
		if not i & 1:
			stri1 += stri[i]
	stri1 += stri[-1]
	print(stri1)


t = int(input())
while t > 0:
	a = input()
	y = list(a)
	w = len(y)
	for i in range(0, 2):
		print(y[i], end='')
	if w > 2:
		for i in range(3, w, 2):
			print(y[i], end='')
	print()
	t = t - 1


n = int(input())
for _ in range(n):
	s = input()
	print(''.join(list((c for (i, c) in enumerate(s) if i % 2 == 0 or i == len(s) - 1))))


n = int(input())
for i in range(n):
	string = input()
	length = len(string)
	if length == 2:
		print(string)
		continue
	temp = string[0]
	for i in range(1, length, 2):
		temp += string[i]
	print(temp)


t = int(input())
for i in range(t):
	s = input()
	l = len(s)
	ns = ''
	for i in range(l):
		if i == 0:
			ns += s[i]
		elif i == l:
			ns += s[i]
		elif i % 2 != 0:
			ns += s[i]
	print(ns)


t = int(input())
for _ in range(t):
	st = input()
	ans = []
	ans.append(st[0])
	for i in range(1, len(st) - 1, 2):
		ans.append(st[i])
	ans.append(st[len(st) - 1])
	for values in ans:
		print(values, end='')
	print()


t = int(input())
while t:
	s = input()
	length = len(s)
	l = []
	l.append(s[0])
	l.append(s[1])
	for i in range(3, length, 2):
		l.append(s[i])
	print(''.join((i for i in l)))
	t -= 1


t = int(input())
for tc in range(t):
	s = input()
	length = len(s)
	i = 1
	res = s[0]
	while i < length - 1:
		res += s[i]
		if s[i] == s[i + 1]:
			i += 1
		i += 1
	res += s[len(s) - 1]
	print(res)


test = int(input())
for i in range(test):
	st = input()
	v = len(st)
	st = st[0:v:2] + st[v - 1]
	print(st)


t = int(input())
for _ in range(t):
	s = input()
	k = len(s)
	if k <= 2:
		print(s)
	else:
		t = ''
		i = 0
		while i < k - 1:
			if i == 0:
				t += s[i]
				i += 1
			if s[i] == s[i - 1]:
				t += s[i]
				i += 1
			i += 1
		t += s[k - 1]
		print(t)


t = int(input())
while t:
	s = input()
	n = len(s)
	ans = ''
	ans += s[:2]
	for i in range(3, n, 2):
		ans += s[i]
	print(ans)
	t -= 1


import sys

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

def sieve(n):
	a = [1] * n
	for i in range(2, n):
		if a[i]:
			for j in range(i * i, n, i):
				a[j] = 0
	return a
for __ in range(int(input())):
	b = input()
	a = b[::2]
	if len(b) % 2 == 0:
		a += b[-1]
	print(a)


from sys import stdin
from math import ceil, gcd

def func():
	return
for _ in range(int(stdin.readline())):
	b = stdin.readline().strip()
	s = b[0]
	for i in range(1, len(b), 2):
		s += b[i]
	print(s)


from collections import defaultdict
t = int(input())
for _ in range(t):
	s = [i for i in input()]
	n = len(s)
	st = ''
	i = 0
	while i < n:
		st += s[i]
		i += 2
	st += s[-1]
	print(st)


def main():
	s = input()
	i = 0
	while i < len(s):
		print(s[i], sep='', end='')
		i += 2
	print(s[len(s) - 1])
	return ''
t = int(input())
for i in range(t):
	print(main())


import sys
T = int(sys.stdin.readline())
ans_arr = []
for t in range(T):
	b = sys.stdin.readline().strip()
	s = ''
	for e in range(len(b)):
		if e % 2 == 0:
			s += b[e]
	s += b[-1]
	ans_arr.append(s)
print('\n'.join(ans_arr))


from math import ceil
T = int(input())
for i in range(T):
	s = input()
	n = len(s)
	r = ''
	r = r + s[0]
	for i in range(1, n, 2):
		r = r + s[i]
	print(r)


N = int(input())
for i in range(N):
	s = input()
	l = len(s)
	a = ''
	for j in range(l):
		if j == 0 or j == 1 or j % 2:
			a += s[j]
	print(a)


import sys
from collections import defaultdict as dd
from queue import Queue
import math
import itertools
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
for _ in range(int(input())):
	q = input()
	w = ''
	for i in range(0, len(q), 2):
		w += q[i]
	print(w + q[-1])


t = int(input())
for k in range(t):
	s = input()
	n = len(s)
	i = 1
	print(s[0], end='')
	while i < n:
		print(s[i], end='')
		i = i + 2
	print()


t = int(input())
for i in range(t):
	s = input()
	l = ''
	l += s[0]
	for j in range(1, len(s)):
		if j % 2:
			l += s[j]
	print(l)


t = int(input())
lst = []
i = 0
for x in range(t):
	b = input()
	if len(b) <= 2:
		answer = b
		print(answer)
	else:
		for z in b:
			if (i + 1) % 2 != 0:
				lst.append(z)
			elif i + 1 == len(b):
				lst.append(z)
			i += 1
		print(''.join((str(i) for i in lst)))
		lst = []
		i = 0


ncases = int(input())
answers = []
for i in range(ncases):
	secret = list(input())
	ans = [secret[0], secret[1]]
	for j in range(3, len(secret), 2):
		ans.append(secret[j])
	answers.append(''.join(ans))
for a in answers:
	print(a)


n = int(input())
for i in range(n):
	b = input()
	y = len(b)
	if len(b) <= 2:
		print(b)
	else:
		print(b[0], end='')
		for f in range(1, y - 1, 2):
			print(b[f], end='')
		print(b[y - 1])


n = int(input())
for i in range(n):
	a = input()
	count = 0
	ans = ''
	for j in range(len(a)):
		count += 1
		if j != 0 and j != len(a) - 1:
			if count % 2 != 0:
				ans += a[j]
		else:
			ans += a[j]
	print(ans)


t = int(input())
for t in range(t):
	p = input()
	q = ''
	if len(p) == 2 or len(p) == 3:
		print(p)
	else:
		q += p[0]
		for i in range(1, len(p) - 1, 2):
			q += p[i]
		q += p[-1]
	print(q)


def codedecode(text: str):
	return text[0::2] + text[-1] if len(text) > 2 else text
row_count = input()
answers = []
for i in range(int(row_count)):
	answers.append(codedecode(input()))
for answer in answers:
	print(answer)


def ques1(s):
	l = []
	l.append(s[0])
	i = 1
	while i < len(s) - 1:
		l.append(s[i])
		i += 2
	l.append(s[-1])
	for i in l:
		print(i, end='')
	print()
t = int(input())
for i in range(t):
	s = input()
	ans = ques1(s)
	ans


n = int(input())
val = [str(input()) for _ in range(n)]
for value in val:
	print(value[0], end='')
	for char in range(1, len(value) - 2, 2):
		print(value[char], end='')
	print(value[-1])


from sys import stdin

def readline():
	return stdin.readline()
tests = int(readline())

def solve(b):
	a = [b[0]]
	for i in range(0, len(b) // 2):
		a.append(b[2 * i + 1])
	return ''.join(a)
for t in range(0, tests):
	b = str(readline())
	print(solve(b))


n = int(input())
for i in range(n):
	s = input()
	if len(s) == 2:
		print(s)
	else:
		ans = ''
		ans += s[0]
		for x in range(1, len(s), 2):
			ans += s[x]
		print(ans)


def get_substring(line):
	res = line[0:2]
	for i in range(3, len(line), 2):
		res += line[i]
	return res
n = int(input())
output_list = []
for i in range(n):
	output_list.append(get_substring(str(input())))
for out in output_list:
	print(out)


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


def solve():
	s = input()
	if len(s) == 2:
		return s
	ans = ''
	for i in range(0, len(s), 2):
		ans += s[i]
	return ans + s[-1]
t = int(input())
while t:
	print(solve())
	t -= 1


def solve(s):
	return s[0] + s[1:len(s) - 1:2] + s[-1]
t = int(input())
for _ in range(t):
	print(solve(input()))


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	s = input().rstrip()
	ans = ''
	n = len(s)
	for i in range(0, n, 2):
		ans += s[i]
	if n & 1 == 0:
		ans += s[-1]
	print(ans)


t = int(input())
for i in range(t):
	s = input()
	l = len(s)
	c = 1
	if l == 2:
		print(s)
	else:
		b = []
		b.append(s[0])
		for i in range(1, l - 1):
			if s[i] == s[i + 1]:
				c += 1
			if s[i] != s[i + 1]:
				b.append(s[i] * (c // 2))
				c = 1
			if i == l - 2:
				if c > 1:
					b.append(s[i] * (c // 2))
			if i == l - 2:
				b.append(s[l - 1])
				break
		print(''.join(map(str, b)))
	c = 1


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


def problem():
	string = input()
	ret = string[0]
	for i in range(1, len(string) - 1, 2):
		ret += string[i]
	ret += string[-1]
	print(ret)
for i in range(int(input())):
	problem()


def counting():
	string = input()
	lenTest = len(string)
	if lenTest == 1:
		return string
	newString = '' + string[0]
	i = 1
	while i < lenTest - 1:
		if string[i] == string[i - 1]:
			i = i + 1
			if i < lenTest - 1:
				newString = newString + string[i]
		else:
			newString = newString + string[i]
		i = i + 1
	return newString + string[lenTest - 1]
test = int(input())
for i in range(0, test):
	print(counting())


num = int(input())
all_ans = []
for _ in range(num):
	string = input()
	ans = ''
	for idx in range(0, len(string), 2):
		ans += string[idx]
	ans += string[len(string) - 1]
	all_ans.append(ans)
print('\n'.join(all_ans))


def func(st):
	ans = ''
	ans += st[0]
	for i in range(1, len(st), 2):
		ans += st[i]
	print(ans)
T = int(input())
for _ in range(T):
	st = input()
	func(st)


n = int(input())
for i in range(n):
	l = []
	m = input()
	j = 0
	while j < len(m) - 1:
		l.append(m[j])
		j = j + 2
	print(''.join(l) + m[-1])


for _ in range(int(input())):
	s = input()
	s1 = s[0]
	if len(s) <= 2:
		print(s)
	else:
		for i in range(1, len(s) - 1):
			if i % 2 == 1:
				s1 = s1 + s[i]
		s1 = s1 + s[len(s) - 1]
		print(s1)


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


for j in range(int(input())):
	a = input()
	d = len(a)
	print(a[0] + a[1:d - 2:2] + a[d - 1])


def c(a):
	b = a[0] + a[1:len(a) - 2:2] + a[-1]
	return b
[print(c(input())) for _ in range(int(input()))]


t = int(input())
for _ in range(t):
	a = str(input())
	b = list(a)
	ans = []
	n = int(len(b))
	for i in range(0, n + 1, 2):
		if i == 0:
			ans.append(b[0])
		elif i == n:
			ans.append(b[-1])
		else:
			ans.append(b[i])
	print(''.join(map(str, ans)))


test_cases = int(input())
for _ in range(test_cases):
	st = input()
	if len(st) > 2:
		for i in range(0, len(st), 2):
			print(st[i], end='')
		if len(st) % 2 == 0:
			print(st[len(st) - 1])
	else:
		print(st)


T = int(input())
for j in range(1, T + 1):
	s = str(input())
	final = s[0] + s[1]
	for i in range(3, len(s) + 1, 2):
		final = final + s[i]
	print(final)


n = int(input())
while n:
	line = input()
	s = line[0]
	for i in range(1, len(line)):
		if i % 2 == 0:
			s += line[i]
	s += line[-1]
	print(s)
	n -= 1


def main():
	t = int(input())
	while t > 0:
		t = t - 1
		s = input()
		n = len(s)
		b = ''
		if n > 2:
			i = 0
			while i < n:
				if i % 2 == 0:
					b = b + s[i]
				i = i + 1
			b = b + s[n - 1]
			print(b)
		else:
			print(s)
main()


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


t = int(input())
for _ in range(t):
	n = input()
	s = n[:2]
	k = len(n)
	for i in range(3, k, 2):
		s = s + n[i]
	print(s)


import math
import sys
import itertools

def sa(Type=int):
	return [Type(x) for x in input().split()]

def solve(t):
	s = input()
	print(s[0], s[1:-1][::2], s[-1], sep='')
t = int(input())
for i in range(t):
	solve(i + 1)


for _ in range(int(input())):
	b = input()
	if len(b) > 2:
		for i in range(0, len(b), 2):
			print(b[i], end='')
		print(b[-1], end='\n')
	elif len(b) == 2 and set(b) != 1:
		print(b)
		continue
	elif len(b) == 2 and set(b) == 1:
		print(set(b))
		continue


t = int(input())
for _ in range(t):
	b = input()
	a = ''
	for i in range(len(b)):
		if i == 0 or i == len(b):
			a = ''.join((a, b[i]))
		elif i % 2 == 1:
			a = ''.join((a, b[i]))
	print(a)


t = int(input())
for _ in range(t):
	s = str(input())
	n = len(s)
	ans = ''
	for i in range(0, n, 2):
		if i != n - 1:
			ans += s[i]
	ans += s[n - 1]
	print(ans)


for i in range(int(input())):
	strin1 = input()
	a = strin1[0:2]
	if len(strin1) >= 4:
		for c in range(3, len(strin1), 2):
			a += strin1[c]
	print(a)


T = int(input())
for _ in range(T):
	s = input().rstrip()
	n = len(s)
	k = max(0, n // 2 + 1 - 2)
	ans = s[0]
	for i in range(k):
		ans += s[1 + 2 * i]
	ans += s[n - 1]
	print(ans)


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


t = int(input())
while t > 0:
	temp = str(input())
	ans = str()
	ans += temp[0]
	j = 1
	while j < len(temp) + 1:
		ans += temp[j]
		j += 2
	print(ans)
	t = t - 1


def main():
	n = int(input())
	for _ in range(n):
		b = input()
		a = ''
		if len(b) == 2:
			print(b)
		else:
			a = b[:2]
			for i in range(3, len(b) + 1, 2):
				a = a + b[i]
			print(a)
main()


from sys import stdin, stdout
import math
t = int(input())
for i in range(t):
	b = input()
	a = ''
	for i in range(0, len(b), 2):
		a += b[i]
	a += b[len(b) - 1]
	print(a)


for _ in range(int(input())):
	b = list(input())
	print(b[0] + ''.join(b[1::2]))


import sys
line = sys.stdin.readlines()
for c in range(1, int(line[0][:-1]) + 1):
	lin = line[c][:-1]
	lista = lin[0] + lin[1:-1:2] + lin[-1]
	print(lista)


for __ in range(int(input())):
	s = input()
	print(s[:2], end='')
	for i in range(3, len(s)):
		if i % 2 == 1:
			print(s[i], end='')
	print('')


for i in range(int(input())):
	b = input()
	a = ''
	if len(b) <= 3:
		a = b
	else:
		a = b[0]
		for index in range(1, len(b), 2):
			a += b[index]
	print(a)


t = int(input())
for i in range(0, t):
	a = input()
	b = len(a)
	for j in range(b):
		if j == 0:
			print(a[j], end='')
		if j % 2 != 0 and j == b - 1:
			print(a[j], end='\n')
			break
		if j % 2 != 0:
			print(a[j], end='')


t = int(input())
for x in range(0, t):
	a = input()
	a_len = len(a)
	print(a[0], end='')
	i = 1
	while i < a_len + 1:
		print(a[i], end='')
		i = i + 2
	print('\n')


for _ in range(int(input())):
	s = input()
	s_new = ''
	i = 0
	while i <= len(s) - 2:
		if s[i] == s[i + 1]:
			s_new += s[i]
			i += 2
		else:
			s_new += s[i]
			i += 1
	s_new += s[-1]
	print(s_new)


def calculate(word):
	output = [word[0], word[1]]
	if len(word) >= 4:
		for index in range(3, len(word), 2):
			output.append(word[index])
	return ''.join(output)
inputs = []
numOfInput = input()
for inputIndex in range(0, int(numOfInput)):
	inputs.append(input())
for lineInput in inputs:
	result = calculate(lineInput)
	print(result)


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


import os
import sys
from io import BytesIO, IOBase

def solution(s):
	n = len(s)
	if n == 2:
		write(s)
		return
	res = [s[i] for i in range(0, n, 2)]
	res.append(s[-1])
	write(''.join(res))

def main():
	for _ in range(r_int()):
		s = input()
		solution(s)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


from sys import stdin
import math

def inp():
	return stdin.readline().strip()
t = int(inp())
for _ in range(t):
	s = inp()
	a = [s[0]]
	for i in range(1, len(s)):
		if i % 2 == 1:
			a.append(s[i])
	print(''.join(a))


t = int(input())
for i in range(0, t):
	st = input()
	li = list(st)
	s1 = st[0]
	for j in range(1, len(st), 2):
		s1 = s1 + st[j]
	print(s1)


t = int(input())
for z in range(t):
	s = input()
	if len(s) < 3:
		print(s)
	else:
		r = s[0]
		i = 1
		while i < len(s):
			r += s[i]
			i += 2
		print(r)


n = int(input())
for _ in range(n):
	s = input()
	res = s[0]
	for c in range(1, len(s), 2):
		res += s[c]
	print(res)


t = int(input())
while t > 0:
	s = input()
	n = len(s)
	i = 0
	res = ''
	while i < n:
		res = res[:] + s[i]
		i += 2
	if i == n:
		res = res[:] + s[n - 1]
	print(res)
	t -= 1


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


t = int(input())
k = []
for i in range(t):
	b = input()
	a = b[0]
	for j in range(1, len(b) - 1, 2):
		a = a + b[j]
	a = a + b[len(b) - 1]
	k.append(a)
for i in range(t):
	print(k[i])


t = int(input())
c = []
for i in range(t):
	s = input()
	s = [i for i in s]
	k = s[0]
	h = s[-1]
	g = k
	s.pop(0)
	s.pop()
	i = 0
	while i < len(s):
		g += s[i]
		i += 2
	g += h
	c.append(g)
for k in c:
	print(k)


t = int(input())
for i in range(t):
	s = input()
	l = []
	l.append(s[0])
	for i in range(1, len(s) - 1, 2):
		l.append(s[i])
	l.append(s[-1])
	print(''.join(l))


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


t = int(input())
for j in range(t):
	st = input()
	print(st[0] + ''.join([x for x in st[1::2]]))


t = int(input())
while t:
	s = input()
	l = []
	for i in s:
		l.append(i)
	if len(l) == 2:
		print(s)
	else:
		i = 1
		while i < len(l) - 1:
			l[i] = 0
			i = i + 2
		s = ''
		for i in l:
			if i != 0:
				s += i
		print(s)
	t -= 1


for t in range(int(input())):
	st1 = input()
	print(st1[::2] + st1[-1])


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	b = list(input())
	alpha = b[1:-1]
	s = [b[0]]
	for i in range(1, len(b) - 1, 2):
		if b[i] == b[i + 1]:
			s.append(b[i])
	s.append(b[-1])
	print(''.join(s))


n = int(input())
for i in range(n):
	a = input()
	s = ''
	for j in range(0, len(a)):
		if j % 2 == 0:
			s = s + a[j]
	if len(a) % 2 == 0:
		s = s + a[-1]
	print(s)


t = int(input())
for _ in range(t):
	s = input()
	start = s[0]
	end = s[-1]
	if len(s) > 2:
		middle = s[1:-1:2]
	else:
		middle = ''
	print(start + middle + end)


n = int(input())
l = []
for i in range(1, n + 1):
	l.append(input())
for i in l:
	a = len(i)
	first1 = i[0]
	rest = i[1:a]
	st = ''
	for j in range(0, len(rest) + 1):
		if j % 2 == 0:
			st = st + rest[j]
	result = first1 + st
	print(result)


n = int(input())
s1 = ''
for i in range(n):
	s = input()
	for j in range(0, len(s) + 1, 2):
		if len(s) == 2:
			print(s)
			break
		elif j >= len(s):
			print(s[j - 1], end='')
		else:
			print(s[j], end='')
	print()


x = int(input())
for i in range(x):
	seq = list(input())
	fir = seq.pop(0)
	last = seq.pop(-1)
	thelist = []
	i = 0
	while i < len(seq) - 1:
		if seq[i] == seq[i + 1]:
			thelist.append(seq[i])
			i += 1
		i += 1
	print(fir, end='')
	for each in thelist:
		print(each, end='')
	print(last)


t = int(input())
l = []
for i in range(0, t):
	s = input()
	l.append(s)
for s in l:
	a = s[1:len(s) - 1]
	new = s[0]
	i = 1
	while i <= len(a):
		new = new + a[i - 1]
		i = i + 2
	new = new + s[-1]
	print(new)


import sys
inp = [x for x in sys.stdin.read().split()]
ii = 0
ttt = int(inp[ii])
ii += 1
for _ in range(ttt):
	b = inp[ii]
	ii += 1
	a = ''
	a += b[0]
	for i in range(1, len(b), 2):
		a += b[i]
	print(a)


from sys import stdin, stdout
int_in = lambda : int(stdin.readline())
arr_in = lambda : [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda : stdin.readline().strip()
out = lambda o: stdout.write('{}\n'.format(o))
arr_out = lambda o: out(' '.join(map(str, o)))
bool_out = lambda o: out('YES' if o else 'NO')
tests = lambda : range(1, int_in() + 1)
case_out = lambda i, o: out('Case #{}: {}'.format(i, o))

def solve(b):
	return b[::2] + b[-1]
for i in tests():
	b = str_in()
	out(solve(b))


for _ in range(int(input())):
	s = input()
	l = len(s)
	a = s[0]
	for i in range(1, l - 1):
		if i % 2 != 0:
			a += s[i]
	a += s[-1]
	print(a)


def a(s):
	res = s[:2]
	if len(s) > 2:
		i = 3
		while i < len(s):
			res += s[i]
			i += 2
	return res
t = int(input())
for i in range(t):
	s = input()
	print(a(s))


t = int(input())
for j in range(t):
	a = list(input())
	for i in range(2, len(a) - (len(a) - 2) // 2):
		a.pop(i)
	print(''.join(a))


import sys

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

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

def get_string():
	return sys.stdin.readline().strip()
for _ in range(int(get_string())):
	a = get_string()
	b = a[0]
	for i in range(1, len(a), 2):
		b += a[i]
	print(b)


def solve():
	t = int(input())
	for i in range(t):
		str = input()
		print(str[:-1:2] + str[-1])
solve()


n = int(input())
for _ in range(n):
	l = list()
	st = input()
	i = 0
	while i < len(st):
		ch1 = st[i]
		ch2 = st[i + 1]
		temp = [ch1, ch2]
		l.append(temp)
		i += 2
	ans = ''
	for i in range(len(l)):
		lt = l[i]
		if i == 0:
			ans = ans + lt[0] + lt[1]
		elif l[i - 1][1] == lt[0]:
			ans = ans + lt[1]
		else:
			ans = ans + lt[0] + lt[1]
	print(ans)
	l.clear()


n = int(input())
for xy in range(n):
	t = input()
	al = 3
	q = t[:2]
	while al < len(t):
		q += t[al]
		al += 2
	print(q)


for i in range(int(input())):
	s = input()
	n = len(s)
	f = s[0]
	l = s[-1]
	a = ''
	for i in range(1, n - 2, 2):
		a = a + s[i]
	print(f + a + l)


t = int(input())
for i in range(t):
	s = input()
	res = ''
	ind = False
	for j in range(len(s) - 1):
		if ind == True:
			ind = False
			continue
		if s[j] != s[j + 1]:
			res += s[j]
		else:
			res += s[j]
			ind = True
	print(res + s[len(s) - 1])


def solve():
	s = input()
	ans = ''
	for i in range(len(s)):
		if i == 0 or i == len(s) - 1:
			ans += s[i]
		if i < len(s) - 1 and i % 2 != 0:
			ans += s[i]
	print(ans)

def main():
	n = int(input())
	for i in range(n):
		solve()
main()


def solution(s: str) -> str:
	if len(s) < 3:
		return s
	return s[0] + s[1:-1:2] + s[-1]
tc = int(input())
for i in range(tc):
	s = input()
	print(solution(s))


t = int(input())
while t != 0:
	strB = input()
	strA = ''
	for i in range(0, len(strB), 2):
		strA = strA + strB[i]
	print(strA + strB[-1])
	t = t - 1


for _ in range(int(input())):
	s = input()
	le = len(s)
	if s == 2:
		print(s)
	else:
		i = 0
		for k in s:
			if i % 2 == 0:
				print(k, end='')
			i += 1
		print(s[-1])


n = int(input())
for i in range(n):
	s = input()
	a = list(s)
	b = []
	for i in range(len(a)):
		if i % 2 == 0:
			b.append(a[i])
	b.append(a[-1])
	f = ''.join(b)
	print(f)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	string = input()
	print(''.join([string[x] for x in range(0, len(string), 2)] + [string[-1]]))


for _ in range(int(input())):
	s = input()
	if len(s) == 1 or len(s) == 2:
		print(s)
		continue
	res = s[:2]
	for i in range(3, len(s), 2):
		res += s[i]
	print(res)


t = int(input())
for dud in range(t):
	b = input()
	res = b[:2]
	idx = 3
	while idx <= len(b) - 1:
		res += b[idx]
		idx += 2
	print(res)


t = int(input())
for _ in range(t):
	s = input()
	r = s[0] + s[1]
	i = 2
	while i < len(s):
		if s[i] == r[-1]:
			j = i + 1
			r += s[j]
		i += 2
	print(r)


for _ in range(int(input())):
	s = input()
	n = len(s)
	i = 1
	s1 = '' + s[0]
	while i < n - 1:
		if s[i] == s[i + 1]:
			i += 1
		s1 += s[i]
		i += 1
	if len(s) > 1:
		s1 += s[n - 1]
	print(s1)


size = int(input())
letters = []
i = 0
while i < size:
	tmp = input()
	letters.append(tmp)
	i += 1
i = 0
while i < size:
	new_letter = ''
	j = 0
	while j < len(letters[i]):
		new_letter += letters[i][j]
		j += 2
	print(new_letter + letters[i][-1])
	i += 1


for _ in range(int(input())):
	b = [i for i in input()]
	res = ''
	i = 0
	while i < len(b):
		if i % 2 == 0:
			res += b[i]
		i += 2
	if i != len(b) - 1:
		res += b[-1]
	print(res)


for _ in range(int(input())):
	b = input()
	c = b[1:-1]
	l = len(c)
	d = ''
	for i in range(0, l, 2):
		d += c[i]
	print(b[0] + d + b[-1])


n = int(input())
for y in range(n):
	a = input()
	a = list(a)
	l = []
	for i in range(len(a)):
		if i % 2 == 0:
			l.append(a[i])
	l.append(a[-1])
	print(''.join(l))


rows = int(input())
for _ in range(rows):
	word = list(input())
	for i in range(len(word)):
		i += 2
		if i >= len(word) - 1:
			break
		word.pop(i)
	print(''.join(word))


n = int(input())
for _ in range(n):
	a = input()
	b = str(a[0])
	for i in range(1, len(a) + 1):
		if i % 2 == 1:
			if i == len(a):
				b += a[-1]
			else:
				b += a[i]
	print(b)


n = int(input())

def equal(x, y):
	if x == y or x == y[::-1]:
		return True
	return False

def solve(x):
	pairs = []
	k = ''
	k += x[0]
	for i in range(1, len(x), 2):
		k += x[i]
	print(k)
for x in range(n):
	solve(input())


import sys
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right
from collections import deque
from collections import Counter
from itertools import accumulate, combinations, permutations
from heapq import heapify, heappop, heappush
from functools import lru_cache

def input():
	return sys.stdin.readline()[:-1]

def printl(li):
	_ = print(*li, sep='\n') if li else None

def argsort(s, return_sorted=False):
	inds = sorted(range(len(s)), key=lambda k: s[k])
	if return_sorted:
		return (inds, [s[i] for i in inds])
	return inds

def alp2num(c, cap=False):
	return ord(c) - 97 if not cap else ord(c) - 65

def num2alp(i, cap=False):
	return chr(i + 97) if not cap else chr(i + 65)

def matmat(A, B):
	(K, N, M) = (len(B), len(A), len(B[0]))
	return [[sum([A[i][k] * B[k][j] for k in range(K)]) for j in range(M)] for i in range(N)]

def matvec(M, v):
	(N, size) = (len(v), len(M))
	return [sum([M[i][j] * v[j] for j in range(N)]) for i in range(size)]

def T(M):
	(n, m) = (len(M), len(M[0]))
	return [[M[j][i] for j in range(n)] for i in range(m)]

def main():
	mod = 1000000007
	s = input()
	ans = ''
	i = 0
	while i < len(s):
		ans += s[i]
		i += 2
	print(ans + s[-1])
q = int(input())
for _ in range(q):
	main()


for t in range(int(input())):
	b = input()
	a = []
	for i in range(len(b)):
		if i % 2 == 0:
			a.append(b[i])
		if i == len(b) - 1:
			a.append(b[i])
	print(*a, sep='')


import sys

def input():
	return sys.stdin.readline()[:-1]

def main():
	for _ in range(int(input())):
		s = input()
		if len(s) == 2:
			print(s)
		else:
			ans = s[0]
			for k in range(1, len(s) - 1, 2):
				ans += s[k]
			ans += s[-1]
			print(ans)
main()


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


t = int(input())
for j in range(t):
	a = []
	b = input()
	if len(b) <= 2:
		print(b)
	else:
		for i in range(len(b)):
			if i < 2:
				a.append(b[i])
		for i in range(len(b)):
			if i >= 2 and i % 2 != 0:
				a.append(b[i])
		print(''.join(a))


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	b = list(si())
	a = []
	for i in range(0, len(b)):
		if i % 2 != 0 or i == 0:
			a.append(b[i])
	print(''.join(a))


for t in range(int(input())):
	b = input()
	a = ''
	for i in range(0, len(b), 2):
		temp = b[i:i + 2]
		if i == 0:
			a += temp
		else:
			a += temp[1]
	print(a)


t = int(input())
for tc in range(t):
	s = []
	n = input()
	c = len(n) - 1
	s.append(n[0])
	i = 1
	while i < len(n) - 1:
		s.append(n[i])
		i = i + 2
	s.append(n[c])
	print(*s, sep='')


t = int(input())
while t > 0:
	s = str(input())
	for i in range(0, len(s), 2):
		print(s[i], end='')
	print(s[len(s) - 1])
	t -= 1


def find(s):
	if len(s) == 2:
		return s
	else:
		x = ''
		for i in range(0, len(s), 2):
			x = x + s[i]
		return x + s[-1]
n = int(input())
for i in range(n):
	s = input()
	print(find(s))


n = int(input())
arr = []
for i in range(n):
	arr.append(str(input()))
for i in range(n):
	ar = []
	j = 0
	a = arr[i]
	while j < len(a) - 1:
		if a[j] == a[j + 1]:
			ar.append(a[j])
			j = j + 2
		else:
			ar.append(a[j])
			j = j + 1
	ar.append(a[-1])
	ar = ''.join(ar)
	print(ar)


t = int(input())
for i in range(t):
	st = input()
	l = list(st)
	l1 = []
	l1.append(l[0])
	l1.append(l[1])
	for i in range(2, len(l)):
		if len(l) >= 2:
			if i % 2 != 0:
				l1.append(l[i])
	st1 = ''.join(map(str, l1))
	print(st1)


t = int(input())
for i in range(t):
	st = input()
	st2 = ''
	l = len(st)
	if l == 2:
		print(st)
	else:
		for j in range(0, l - 1, 2):
			st2 = st2 + st[j]
		st2 = st2 + st[l - 1]
		print(st2)


n = int(input())
for _ in range(n):
	s = input()
	if len(s) == 2:
		print(s)
	else:
		i = 3
		q = s[:2]
		while i < len(s):
			q += s[i]
			i += 2
		print(q)


t = int(input())
for _ in range(t):
	s = input()
	k = []
	for i in range(0, len(s), 2):
		k.append(s[i])
	k.append(s[len(s) - 1])
	print(''.join(k))


def even(s):
	x = ''
	for i in s[::2]:
		x += i
	x += s[len(s) - 1]
	return x
for t in range(int(input())):
	s = input()
	print(even(s))


def main():
	t = int(input())
	while t:
		s = input()
		s = s[0] + s[1::2]
		print(s)
		t -= 1
main()


t = int(input())
for i in range(t):
	a = input()
	print(a[0:2] + a[3::2])


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


def ss(b):
	if len(b) <= 2:
		return b
	a = ''
	for i in range(len(b)):
		if i == 0:
			a = a + b[0]
			continue
		if i == len(b) - 1:
			a = a + b[-1]
			continue
		if i % 2 == 0:
			a = a + b[i]
	return a
t = int(input())
for _ in range(t):
	b = input()
	print(ss(b))


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


for _ in range(int(input())):
	palabra = input()
	duos = [palabra[2 * i:2 * i + 2] for i in range(len(palabra) // 2)]
	palabra = duos.pop(0)
	for (_, l) in duos:
		palabra += l
	print(palabra)


for t in range(int(input())):
	b = input()
	ans = b[:2]
	if len(b) == 3:
		ans += b[2]
	elif len(b) > 3:
		for i in range(3, len(b), 2):
			ans += b[i]
	print(ans)


t = int(input())
r = []
for i in range(t):
	x = input()
	if len(x) != 2:
		r.append(x[0] + x[1:-1:2] + x[-1])
	else:
		r.append(x)
for i in r:
	print(i)


def process(x):
	if len(x) == 2:
		return x
	else:
		output = x[0] + process(x[2:])
		return output

def main():
	num_input = int(input())
	for _ in range(num_input):
		secret = input()
		result = process(secret)
		print(result)
main()


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


from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict
import math
rl = lambda : stdin.readline()
rll = lambda : stdin.readline().split()
rli = lambda : map(int, stdin.readline().split())
rlf = lambda : map(float, stdin.readline().split())
(INF, NINF) = (float('inf'), float('-inf'))

def main():
	T = int(rl())
	for _ in range(T):
		s = rll()[0]
		grps = []
		for (i, c) in enumerate(s):
			if (i + 1) % 2 == 0:
				grps.append(s[i - 1:i + 1])
		ans = []
		for (i, grp) in enumerate(grps):
			if i == 0:
				ans.append(grp)
			else:
				ans.append(grp[1])
		print(''.join((x for x in ans)))
	stdout.close()
main()


def main():
	t = int(input())
	for i in range(0, t):
		b = input()
		c = ''
		c = c + b[0]
		c = c + b[1]
		for i in range(2, len(b)):
			if i % 2 == 1:
				c = c + b[i]
		print(c)
main()


from sys import stdin
N = int(stdin.readline())
for case in range(N):
	string = stdin.readline().strip()
	print(string[::2] + string[-1])


t = int(input())
if t >= 1 and t <= pow(10, 4):
	while t > 0:
		x = input()
		if len(x) >= 2 and len(x) <= 100:
			start = x[0]
			middle = x[1:len(x) - 1:2]
			end = x[len(x) - 1]
			print(start + middle + end)
		t -= 1


for s in [*open(0)][1:]:
	print(s[0] + s[1:-2:2] + s[-2])


l = []
for i in range(int(input())):
	str = input()
	b = str[1:len(str) - 1:2]
	a = str[0] + b + str[-1]
	l.append(a)
for i in l:
	print(i)


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


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


T = int(input())
for t in range(T):
	b = input().strip()
	ans = b[:2]
	for i in range(3, len(b), 2):
		ans += b[i]
	print(ans)


def test(a):
	data = []
	for i in range(0, len(a), 2):
		data.append(a[i:i + 2])
	answer = ''
	for i in range(len(data)):
		if i == 0:
			answer += data[i]
		else:
			answer += data[i][1]
	return answer
t = int(input())
for i in range(t):
	a = input()
	print(test(a))


for _ in range(int(input())):
	b = list(input())
	i = 0
	while i < len(b):
		print(b[i], end='')
		i += 2
	if i == len(b):
		print(b[i - 1])
	else:
		print('')


for r in range(int(input())):
	a = input()
	c = ''
	for i in range(1, len(a) - 1, 2):
		c = c + a[i]
	print(a[0] + c + a[-1])


for _ in range(int(input())):
	a = input()
	c = a[0]
	for i in range(len(a)):
		if i % 2 != 0:
			c += str(''.join(a[i]))
	print(c)


def fun(b):
	if len(b) == 2:
		return b
	a = b[0]
	x = b[-1]
	b = b[1:-1]
	for i in range(0, len(b), 2):
		a = a + b[i]
	a = a + x
	return a
for _ in range(int(input())):
	print(fun(input()))


def main(b):
	a = ''
	a = a + b[0]
	index = 1
	while index < len(b):
		a = a + b[index]
		index = index + 2
	return a
t = int(input())
for t_itr in range(t):
	b = input()
	res = main(b)
	print(res)


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from math import sqrt, floor, factorial, gcd, log
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
from math import gcd
from bisect import bisect
input = lambda : sys.stdin.readline().rstrip('\r\n')
read = lambda : list(map(int, input().strip().split(' ')))

def solve():
	for _ in range(int(input())):
		s = input()
		s = s[0] + ''.join([s[i] for i in range(1, len(s) - 2, 2)]) + s[-1]
		print(s)
solve()


t = int(input())
for __ in range(t):
	s = input()
	if len(s) <= 2:
		print(s)
	else:
		print(s[:2], end='')
		for i in range(3, len(s), 2):
			print(s[i], end='')
		print()


for _ in range(int(input())):
	b = input()
	if len(b) == 2:
		print(b)
	else:
		print(b[0::2] + b[-1:])


t = int(input())
for i in range(t):
	string = input()
	ans = string[0] + string[1]
	for j in range(2, len(string)):
		if j % 2 == 0:
			continue
		else:
			ans += string[j]
	print(ans)


t = int(input())
c = True
while c:
	b = input()
	lenth_of_string = len(b)
	ans = b[0]
	i = 2
	while i < lenth_of_string:
		ans = ans + b[i]
		i = i + 2
	if lenth_of_string % 2 == 0:
		print(ans + b[lenth_of_string - 1])
	else:
		print(ans)
	t = t - 1
	if t == 0:
		c = False


t = int(input())
for i in range(t):
	s = input()
	if len(s) <= 2:
		print(s)
	else:
		a = []
		for i in range(0, len(s) - 1, 2):
			a.append(s[i])
		if a[len(a) - 1] != s[len(s) - 1] or len(a) != len(s) // 2 + 1:
			a.append(s[-1])
		else:
			pass
		print(''.join(a))


tc = int(input().strip())
while tc:
	bstr = input().strip()
	if len(bstr) == 2:
		print(bstr)
	else:
		astr = []
		astr.append(bstr[0])
		i = 1
		while i < len(bstr) - 1:
			astr.append(bstr[i])
			i += 2
		astr.append(bstr[-1])
		print(''.join(astr))
	tc -= 1


t = int(input())
while t:
	s = ''
	a = input()
	s = a[:2]
	for i in a[3::2]:
		s += i
	print(s)
	t -= 1


t = int(input())
for i in range(t):
	s = input()
	k = 0
	s1 = ''
	for j in range(len(s) // 2):
		s1 += s[j + k]
		k += 1
	s1 += s[-1]
	print(s1)


for _ in range(int(input())):
	s = input()
	n = len(s)
	out = ''
	out += s[0]
	for i in range(1, n - 1, 2):
		out += s[i]
	out += s[n - 1]
	print(out)


cnt = int(input())
for _ in range(cnt):
	txt = input()
	leng = len(txt)
	print(txt[0], end='')
	for i in range(1, leng - 1, 2):
		print(txt[i], end='')
	print(txt[leng - 1])


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


n = int(input())
while n != 0:
	s = list(input())
	l = []
	l.append(s[0])
	i = 1
	while i < len(s) - 1:
		if s[i] == s[i + 1]:
			l.append(s[i + 1])
			i = i + 2
		else:
			i = i + 1
	l.append(s[len(s) - 1])
	print(''.join(map(str, l)))
	n = n - 1


n = int(input())
for i in range(n):
	s = input()
	j = 0
	ne = ''
	while j < len(s):
		ne += s[j]
		j += 2
	ne += s[-1]
	print(ne)


t = int(input())
for _ in range(t):
	str = input()
	for i in range(0, len(str) - 2, 2):
		print(str[i], end='')
	print(str[-2] + str[-1])


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


t = int(input())
for i in range(t):
	s = input()
	l = list(s[:2])
	for j in range(2, len(s)):
		if j % 2 != 0:
			l.append(s[j])
	l = ''.join(l)
	print(l)


case = int(input())
for i in range(case):
	b = input()
	result = []
	result.append(b[0:len(b) - 2:2])
	result.append(b[len(b) - 2:])
	print(''.join(map(str, result)))


t = int(input())
for i in range(t):
	a = input()
	print(a[0], end='')
	for i in range(1, len(a)):
		if i % 2:
			print(a[i], end='')
	print()


t = int(input())
for _ in range(t):
	s = input()
	n = len(s)
	arr = []
	ans = ''
	for x in range(0, n, 2):
		ans += s[x]
	ans += s[n - 1]
	print(ans)


for _ in range(int(input())):
	x = input()
	xl = len(x)
	y = x[0]
	for i in range(1, xl - 1, 2):
		if x[i] == x[i + 1]:
			y = y + x[i]
	y = y + x[xl - 1]
	print(y)


T = int(input())
while T > 0:
	s = str(input())
	a = s[0]
	i = 1
	while i < len(s):
		a = a + s[i]
		i = i + 2
	if len(s) == 2:
		print(s)
	else:
		print(a)
	T = T - 1


t = int(input())
for _ in range(t):
	s = input()
	i = 0
	flag = True
	res = ''
	while i < len(s):
		res += s[i]
		i += 2
	res += s[-1]
	print(res)


t = int(input())
for i in range(t):
	s = input()
	op = s[:2]
	l = len(s)
	i = 3
	while i < l:
		op += s[i]
		i += 2
	print(op)


def init():
	n = int(input())
	strings = []
	for _ in range(n):
		strings.append(input())
	return strings

def get_original_string(string):
	original_string = string[0:2]
	for i in range(3, len(string), 2):
		original_string += string[i]
	return original_string

def main():
	strings = init()
	for string in strings:
		print(get_original_string(string))
main()


T = int(input())
A = []
for k in range(T):
	b = input()
	res = b[0]
	for i in range(1, len(b) - 1, 2):
		res += b[i]
	res += b[-1]
	A.append(res)
for i in A:
	print(i)


def bstring(s):
	sf = ''
	sf += s[0]
	for i in range(1, len(s)):
		if i % 2 == 0:
			sf += s[i]
	sf += s[-1]
	return sf
n = int(input())
l = []
lf = []
for i in range(n):
	l.append(input())
for i in range(len(l)):
	lf.append(bstring(l[i]))
for i in range(len(lf)):
	print(lf[i])


n = int(input())
for i in range(n):
	c = str(input())
	d = c[0:2]
	for j in range(3, len(c), 2):
		d += c[j]
	print(str(d))


t = int(input())
for i in range(t):
	b = input()
	s = ''
	s += b[:2]
	for j in range(3, len(b), 2):
		s += b[j]
	print(s)


t = int(input())
for case in range(t):
	s = input()
	ans = []
	ans.append(s[0])
	for i in range(1, len(s) - 1, 2):
		ans.append(s[i])
	ans.append(s[-1])
	print(''.join(ans))


test_cases = int(input())
for e in range(test_cases):
	stringb = input()
	print(stringb[0::2] + stringb[-1])


t = int(input())
for i in range(t):
	b = input()
	a = ''
	x = 0
	if len(b) % 2 == 0:
		for j in range(len(b) // 2):
			a = a + b[j + x]
			x = x + 1
		a = a + b[-1]
		print(a)
	else:
		for j in range(len(b) // 2 + 1):
			a = a + b[j + x]
			x = x + 1
		print(a)


def decode(b):
	last_flag = 0
	int_an = 0
	a = ''
	for i in range(len(b) - 1):
		if b[i] == last_flag and int_an == 0:
			int_an = 1
		elif int_an == 1:
			int_an = 0
			a += b[i]
		else:
			a += b[i]
		last_flag = b[i]
	a += b[len(b) - 1]
	return a

def inp():
	t = int(input(''))
	a_list = []
	for i in range(t):
		a_list.append(input(''))
	for i in a_list:
		print(decode(i))
inp()


for _ in range(int(input())):
	st = input()
	print(st[0], end='')
	x = -1
	while x < len(st) - 2:
		x += 2
		print(st[x], end='')
	print()


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


t = int(input())
for i in range(t):
	b_word = input()
	l = []
	for i in b_word:
		l.append(i)
	a_word = b_word[0] + ''.join(l[1:-1:2]) + b_word[-1]
	print(a_word)


for i in range(int(input())):
	b = input()
	print(b[:2] + b[3::2])


import collections, heapq, itertools, math, functools
groupby = itertools.groupby
rs = lambda : input()
ri = lambda : int(input())
rm = lambda : map(int, input().split())
rai = lambda : [int(x) for x in input().split()]

def solve(s):
	ans = ''
	for i in range(0, len(s) - 1, 2):
		ans += s[i]
	ans += s[-1]
	return ans
for t in range(ri()):
	s = input()
	print(solve(s))


for i in range(int(input())):
	s = str(input())
	len1 = len(s)
	len1 = len1 // 2
	l = []
	for i in range(0, len(s), 2):
		l.append(s[i])
	l.append(s[-1])
	print(*l, sep='')


ii = lambda : int(input())
si = lambda : input()
for _ in range(ii()):
	b = list(si())
	a = []
	for i in range(0, len(b)):
		if i % 2 != 0 or i == 0:
			a.append(b[i])
	print(''.join(a))


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


def sol(s):
	if len(s) == 2:
		return s
	else:
		p = ''
		for _ in range(2, len(s)):
			if _ % 2 == 1:
				p += s[_]
		return s[:2] + p
t = int(input())
for _ in range(t):
	s = input()
	print(sol(s))


for _ in range(int(input())):
	z = list(map(str, input()))
	k = z[0:2]
	for i in range(2, len(z)):
		if i % 2 != 0:
			k.append(z[i])
	for i in k:
		print(i, end='')
	print()


def main():
	testCases = int(input())
	for _ in range(testCases):
		b = input().rstrip()
		a = b[0:1]
		if len(b) > 2:
			for i in range(1, len(b) - 1, 2):
				a += b[i:i + 1]
		a += b[-1]
		print(a)
main()


from math import radians
from heapq import heapify, heappush, heappop
import bisect
from math import pi
from collections import deque
from math import factorial
from math import log, ceil
from collections import defaultdict
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = int(pow(10, 9) + 7)

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li1():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

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

def fli():
	return list(fmi())
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

def SieveOfEratosthenes(n, isPrime):
	isPrime[0] = isPrime[1] = False
	for i in range(2, n):
		isPrime[i] = True
	p = 2
	while p * p <= n:
		if isPrime[p] == True:
			i = p * p
			while i <= n:
				isPrime[i] = False
				i += p
		p += 1
	return isPrime

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')

def binsearch(a, l, r, x):
	while l <= r:
		mid = l + (r - 1) // 2
		if a[mid]:
			return mid
		elif a[mid] > x:
			l = mid - 1
		else:
			r = mid + 1
	return -1

def readTree(n):
	adj = [set() for _ in range(n)]
	for _ in range(n - 1):
		(u, v) = map(int, input().split())
		adj[u - 1].add(v - 1)
		adj[v - 1].add(u - 1)
	return adj

def treeOrderByDepth(n, adj, root=0):
	parent = [-2] + [-1] * (n - 1)
	ordered = []
	q = deque()
	q.append(root)
	depth = [0] * n
	while q:
		c = q.popleft()
		ordered.append(c)
		for a in adj[c]:
			if parent[a] == -1:
				parent[a] = c
				depth[a] = depth[c] + 1
				q.append(a)
	return (ordered, parent, depth)

def isSubSequence(str1, str2):
	m = len(str1)
	n = len(str2)
	j = 0
	i = 0
	while j < m and i < n:
		if str1[j] == str2[i]:
			j = j + 1
		i = i + 1
	return j == m

def nextPowerOf2(n):
	count = 0
	if n and (not n & n - 1):
		return n
	while n != 0:
		n >>= 1
		count += 1
	return 1 << count
for _ in range(ii()):
	s = si()
	ans = s[0] + s[1]
	for i in range(2, len(s), 2):
		if ans[-1] == s[i]:
			ans += s[i + 1]
	print(ans)


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


n = int(input())
ans = [''] * n
for i in range(n):
	s = input()
	ans[i] += s[0]
	k = 1
	while k < len(s):
		ans[i] += s[k]
		k += 2
for i in range(n):
	print(ans[i])


t = int(input())
for _ in range(0, t):
	s1 = input()
	s2 = ''
	s2 += s1[0]
	for i in range(1, len(s1) - 1, 2):
		if s1[i] == s1[i + 1]:
			s2 += s1[i]
	s2 += s1[len(s1) - 1]
	print(s2)


import sys
import heapq

def main():
	t = int(input())
	for _ in range(t):
		s = input()
		ans = s[0]
		for i in range(len(s) // 2):
			ans += s[2 * i + 1]
		print(ans)
	return
main()


def shortsubstring(st):
	if len(st) == 2:
		return st
	x = st[0]
	for i in range(1, len(st) + 1, 2):
		x += st[i]
	return x
t = int(input())
for i in range(t):
	print(shortsubstring(input()))


for i in range(int(input())):
	s = input()
	print(''.join([s[2 * x] for x in range(len(s) // 2)]) + s[-1])


def sol(s):
	if len(s) > 2:
		fi = s[0]
		la = s[-1]
		re = s[1:-1]
		f = fi
		for x in range(0, len(re), 2):
			f += re[x]
		f += la
		return f
	else:
		return s
t = int(input())
for _ in range(t):
	s = input()
	v = sol(s)
	print(v)


for _ in range(int(input())):
	s = input()
	ans = ''
	i = 1
	while i < len(s):
		ans += s[i - 1]
		if s[i - 1] == s[i]:
			i += 2
		else:
			i += 1
	ans += s[-1]
	print(ans)


for _ in range(int(input())):
	x = str(input())
	L = list(x)
	k = []
	for i in range(len(L)):
		if i % 2 != 0 or i == 0:
			k.append(L[i])
	listToStr = ''.join([str(elem) for elem in k])
	print(listToStr)


t = int(input())
l = []
for i in range(t):
	x = input()
	y = x[::2] + x[-1]
	l.append(y)
for i in l:
	print(i)


from array import *
u = int(input())
for j in range(u):
	str = input()
	print(str[0], end='')
	i = 0
	i = i + 1
	while i in range(1, len(str) - 1):
		print(str[i], end='')
		i = i + 2
	print(str[len(str) - 1])
	i = 0


t = int(input())
for _ in range(t):
	b = list(input())
	b.insert(0, b[0])
	b.append(b[len(b) - 1])
	ans = [b[i] for i in range(0, len(b), 2)]
	print(''.join(ans))


from sys import stdin, stdout
import math, collections

def solve():
	cases = int(input())
	for case in range(1, cases + 1):
		a = input()
		ans = [a[0]]
		for i in range(1, len(a), 2):
			ans.append(a[i])
		print(''.join(ans))
solve()


t = int(input())
for i in range(t):
	b = str(input())
	l = len(b)
	j = 0
	a = ''
	while j < l:
		if j == 0 or j == l - 1:
			a += b[j]
			j += 1
		else:
			a += b[j]
			j += 2
	print(a)


def shortSubstrings(s):
	out = ''
	for i in range(0, len(s) - 1, 2):
		out += s[i]
	out += s[-1]
	return out
t = int(input())
for _ in range(t):
	a = input()
	print(shortSubstrings(a))


for tt in range(int(input())):
	s = input()
	ans = [s[0]]
	i = 1
	while i < len(s) - 1:
		if s[i] == s[i + 1]:
			ans.append(s[i])
			i += 1
		i += 1
	ans.append(s[-1])
	print(''.join(ans))


a = int(input())
for test in range(a):
	s = input()
	x = []
	for i in range(0, len(s), 2):
		x.append(s[i])
	x.append(s[-1])
	print(''.join(x))


n = int(input())

def calc(a):
	z = ''
	for i in range(1, len(a) - 1, 2):
		z = z + a[i]
	z = a[0] + z + a[-1]
	print(z)
for i in range(n):
	a = input()
	calc(a)


for _ in range(int(input())):
	n = str(input())
	N = n[1::2]
	print(n[0] + N)


t = int(input())
s1 = []
for test in range(t):
	s = str(input())
	s1.append(s)
for a in s1:
	if len(a) == 2:
		print(a)
	else:
		l = list(a)
		b = []
		for i in range(0, len(l), 2):
			b.append(l[i])
		b.append(l[len(a) - 1])
		print(*b, sep='')


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


T = int(input())
for i in range(T):
	s = input()
	s1 = s[0]
	for j in range(1, len(s) - 1):
		if j % 2 == 1:
			s1 += s[j]
	s1 += s[len(s) - 1]
	print(s1)


for i in range(int(input())):
	n = input()
	if len(n) <= 2:
		print(n)
	else:
		b = ''
		for x in range(3, len(n), 2):
			b += n[x]
		print(n[:2] + b)


def main():
	for _ in range(int(input())):
		b = input()
		a = b[::2]
		print(a + b[-1])
main()


n = int(input())
for i in range(n):
	s = input()
	l = [s[i:i + 2] for i in range(len(s)) if i % 2 == 0]
	s1 = l[0]
	for i in range(1, len(l)):
		s1 += l[i][1]
	print(s1)


try:
	for _ in range(int(input())):
		st = input()
		ans = ''
		l = len(st)
		if l <= 2:
			print(st)
		else:
			ptr = 0
			while ptr < l - 1:
				if st[ptr] != st[ptr + 1]:
					ans += st[ptr]
					ptr += 1
				else:
					ans += st[ptr]
					ptr += 2
			ans += st[l - 1]
			print(ans)
except:
	pass


def strings(a):
	for i in range(2, len(a), 2):
		if a[i] == a[i - 1]:
			a[i] = '0'
	while '0' in a:
		a.remove('0')
	a = ''.join(a)
	print(a)
n = int(input())
for j in range(0, n):
	a = list(input())
	strings(a)


rr = lambda : input()
rri = lambda : int(input())
rrm = lambda : list(map(int, input().split()))
INF = float('inf')

def solve(b):
	ans = [b[0]]
	for i in range(1, len(b) - 1, 2):
		ans.append(b[i])
	ans.append(b[-1])
	return ''.join(ans)
t = int(input())
for _ in range(t):
	b = rr()
	print(solve(b))


t = int(input())
for _ in range(t):
	s = input().rstrip()
	if len(s) <= 2:
		print(s)
	else:
		ss = ''
		ss += s[0]
		for i in range(1, len(s) - 1, 2):
			if s[i] == s[i + 1]:
				ss += s[i]
		ss += s[-1]
		print(ss)


t = int(input())
for _ in range(t):
	arr = input()
	newstr = str(arr[0]) + str(arr[1])
	i = 2
	while i < len(arr):
		if arr[i] == arr[i - 1]:
			if i + 1 != len(arr):
				newstr += str(arr[i + 1])
			i += 2
		else:
			newstr += str(arr[i])
			if i + 1 != len(arr):
				newstr += str(arr[i + 1])
	print(str(newstr))


t = int(input())
for i in range(t):
	string_b = input()
	n = len(string_b)
	if n == 2:
		print(string_b)
	else:
		string_a = string_b[0]
		for k in range(1, n - 1, 2):
			string_a += string_b[k]
		string_a += string_b[-1]
		print(string_a)


for _ in range(int(input())):
	s = input()
	s = list(s)
	for i in range(2, len(s) - 1, 2):
		s[i] = '0'
	ans = ''
	for i in s:
		if i != '0':
			ans = ans + i
	print(ans)


for _ in range(int(input())):
	s = input()
	n = len(s)
	if n == 2:
		print(s)
	else:
		b = s[n - 1:]
		t = s[:1]
		for i in range(1, n - 1, 2):
			t += s[i]
		print(t + b)


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()
	if len(s) == 2:
		print(s)
		continue
	(a, p) = (0, 0)
	q = ''
	for i in s:
		if a == 0 or a == len(s) - 1:
			q += i
		elif a % 2 != 0:
			q += i
		a += 1
	print(q)


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		s = input().rstrip()
		ans = s[:2]
		for i in range(3, len(s), 2):
			ans += s[i]
		print(ans)
main()


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


for i in range(int(input())):
	s = input()
	if len(s) > 2:
		s = list(s)
		sub = list(s[0])
		for i in range(1, len(s) - 1):
			if i % 2 != 0:
				sub.append(s[i])
		print(''.join(sub) + s[-1])
		continue
	else:
		print(s)


t = int(input())
for i in range(t):
	n = input()
	count = 1
	lis = list(n)
	j = 0
	while j < len(lis):
		if count == 3:
			lis.pop(j)
			count = 2
		count = count + 1
		j = j + 1
	news = ''
	lisr = news.join(lis)
	print(lisr)


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


T = int(input())
for test in range(T):
	s = input()
	i = 0
	ans = ''
	while i < len(s):
		ans += s[i]
		i += 2
	print(ans + s[-1])


a = int(input())
for k in range(a):
	b = input()
	c = b[0]
	for k in range((len(b) - 2) // 2):
		c += b[k * 2 + 1]
	print(c + b[-1])


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
t = intIn()
while t > 0:
	t -= 1
	s = input()
	n = len(s)
	ans = s[0]
	for i in range(1, n - 1, 2):
		ans += s[i]
	ans += s[-1]
	print(ans)


strings_number = int(input())
strings = []
for i in range(strings_number):
	strings.append(input())
original_strings = []
for i in range(strings_number):
	original_string = ''
	length_cur = len(strings[i])
	j = 0
	while j < length_cur - 1:
		original_string = original_string + strings[i][j]
		j = j + 2
	original_string = original_string + strings[i][length_cur - 1]
	original_strings.append(original_string)
for i in original_strings:
	print(i)


stri = ''
inp = int(input())
for x in range(inp):
	inp1 = input()
	stri = inp1[0:2]
	if len(inp1) <= 2:
		print(inp1)
	else:
		for letter in range(2, len(inp1)):
			if letter % 2 != 0:
				stri += inp1[letter]
		print(stri)
	stri = ''


t = int(input())
for _ in range(t):
	st = str(input())
	n = len(st)
	if n == 2:
		print(st)
	else:
		start = st[0]
		end = st[-1]
		mid = st[1:n - 1]
		m = list(mid)
		temp = ''
		for i in range(0, n - 2, 2):
			temp += mid[i]
		print(start + temp + end)


def help():
	st = input()
	ans1 = [st[0]]
	for i in range(1, len(st) - 1, 2):
		ans1.append(st[i])
	ans1.append(st[-1])
	print(*ans1, sep='')
for _ in range(int(input())):
	help()


t = int(input())
for _ in range(t):
	s = str(input())
	b = s[0] + s[1::2]
	print(b)


t = int(input())
for i in range(t):
	n = input()
	s = ''
	if len(n) == 2:
		print(n)
	else:
		for i in range(0, len(n)):
			if i == 0:
				s = s + n[i]
			elif i % 2 == 1:
				s = s + n[i]
		print(s)


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


n1 = int(input())
for _ in range(n1):
	s1 = input()
	rest = s1[0]
	for c in range(1, len(s1), 2):
		rest += s1[c]
	print(rest)


t = int(input())
while t > 0:
	s = input()
	l = [i for i in s]
	l1 = [l[0]]
	for i in range(1, len(l)):
		if i % 2 != 0:
			l1.append(l[i])
	print(''.join(l1))
	t -= 1


for i1 in range(int(input())):
	b = input()
	b = b.rstrip()
	b = b.replace('/r', '')
	i = 0
	s = ''
	while i < len(b):
		t = b[i]
		s = s + t
		i += 2
	s = s + b[-1]
	print(s)


for _ in range(int(input())):
	word = input()
	if len(word) <= 2:
		print(word)
		continue
	ans = ''
	for i in range(len(word)):
		if i % 2 != 0 and i <= len(word) - 2:
			pass
		else:
			ans += word[i]
	print(ans)


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


def shortSubstrings(s):
	res = ''
	res += s[0]
	for i in range(1, len(s) - 1, 2):
		res += s[i]
	res += s[-1]
	return res
n = int(input())
for i in range(n):
	s = input()
	print(shortSubstrings(s))


from sys import stdin, stdout
from collections import deque, defaultdict
from math import ceil, floor, inf, sqrt, factorial, gcd, log2
from copy import deepcopy
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
for _ in range(ii1()):
	s = is1()
	ans = ''
	ans += s[0]
	n = len(s)
	for i in range(1, n, 2):
		ans += s[i]
	print(ans)


for _ in range(int(input())):
	arr = list(input())
	b = [arr[0]]
	for i in range(1, len(arr) - 1, 2):
		b.append(arr[i])
	b.append(arr[len(arr) - 1])
	strR = ''
	for i in range(len(b)):
		strR += b[i]
	print(strR)


class B:

	def __init__(self):
		self.n = int(input())
		self.l = []

	def create(self):
		for i in range(self.n):
			v = input()
			if len(v) >= 2:
				self.l.append(v)

	def get(self):
		for i in self.l:
			self.ge_t(i)

	def ge_t(self, s):
		count = 0
		x = ''
		y = ''
		c = [s[i:i + 2] for i in range(0, len(s), 2)]
		xx = c[-1]
		for k in c:
			if count < len(c) - 1:
				y = y + k[0]
				count += 1
		y = y + xx
		print(y)
		c.clear()
obj = B()
obj.create()
obj.get()


t = int(input())
for i in range(t):
	s = input()
	n = len(s)
	r = ''
	r = r + s[0]
	if n == 2:
		print(s)
		continue
	for i in range(1, n, 2):
		r = r + s[i]
	print(r)


def astring(b):
	x = ''
	if len(b) == 2:
		return b
	else:
		for i in range(0, len(b) - 1, 2):
			x = x + b[i]
		x = x + b[-1]
	return x
t = int(input())
for tc in range(t):
	b = input()
	a = astring(b)
	print(a)


t = int(input())
for i in range(t):
	li = []
	k = input()
	if len(k) == 2:
		print(k)
	else:
		for j in range(0, len(k) - 1, 2):
			li.append(k[j])
		s = ''.join(li)
		s = s + k[len(k) - 1]
		print(s)


from sys import stdin
input = lambda : stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
from math import ceil, sqrt, factorial, gcd, log
for _ in rn():
	n = input()
	l = n[0]
	for i in range(1, len(n) - 1, 2):
		l += n[i]
	l += n[-1]
	print(l)


t = int(input())
for case in range(t):
	b = input().strip()
	a = b[::2]
	a += b[-1]
	print(a)


T = int(input())
for t in range(T):
	string = input()
	if len(string) == 2:
		print(string)
	else:
		answer = string[0]
		for i in range(1, len(string) - 1, 2):
			answer += string[i]
		answer += string[len(string) - 1]
		print(answer)


import math
t = int(input())
for g in range(t):
	s = input()
	n = len(s)
	ans = ''
	for i in range(0, n, 2):
		ans += s[i]
	ans += s[n - 1]
	print(ans)


def main():
	str1 = str(input())
	res = str1[:2]
	for i in range(3, len(str1)):
		if i % 2:
			res += str1[i]
	print(res)
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


for t in range(int(input())):
	b = input()
	a = ''.join(b[::2])
	a += b[-1]
	print(a)


INT_MAX = 10 ** 11 + 7
MOD = 10 ** 9 + 7

def INPUT():
	return list((float(i) for i in input().split()))

def LIST_1D_ARRAY(n):
	return [0 for _ in range(n)]

def LIST_2D_ARRAY(m, n):
	return [[0 for _ in range(n)] for _ in range(m)]
import math
import random as R

def calc(s):
	ans = s[0]
	i = 2
	count = 1
	while i < len(s) - 1:
		if s[i] == s[i - 1]:
			while i < len(s) - 1 and s[i] == s[i - 1]:
				count += 1
				i += 1
			ans += s[i - 1] * (count // 2)
			count = 1
		else:
			i += 1
	return ans + s[-1]
for _ in range(int(input())):
	s = input()
	print(calc(s))


from sys import stdin
input = stdin.readline

def main():
	test = int(input())
	for _ in range(test):
		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()


N = int(input())
for i in range(N):
	something = list(input())
	banana = something
	havana = len(banana)
	if len(banana) > 2:
		if len(banana) % 2 == 0:
			last = banana[havana - 1]
			del banana[1::2]
			banana.append(last)
			res = ''.join(banana)
			print(res)
		else:
			del banana[1::2]
			res = ''.join(banana)
			print(res)
	else:
		res = ''.join(banana)
		print(res)


for t in range(int(input())):
	s = input()
	c = []
	d = ''
	for i in range(0, len(s), 2):
		c.append(s[i] + s[i + 1])
	for item in c:
		if len(d) == 0:
			d = d + item
		elif item[0] == d[len(d) - 1]:
			d = d + item[1]
	print(d)


def slicer(seq):
	size = len(seq)
	new_seq = ''
	for j in range(1, size - 1, 2):
		first_char = seq[j]
		sec_char = seq[j + 1]
		if first_char == sec_char:
			new_seq = new_seq + first_char
		else:
			new_seq = new_seq + first_char + sec_char
	new_seq = seq[0] + new_seq + seq[-1]
	return new_seq
n = int(input())
for i in range(n):
	print(slicer(input()))


t = int(input())
for _ in range(t):
	s = input()
	ans = s[:2]
	for i in s[3::2]:
		ans += i
	print(ans)


import os
t = int(input())
while t:
	t -= 1
	s = input()
	print(s[0], end='')
	i = 1
	while i < len(s) - 1:
		print(s[i], end='')
		i += 2
	print(s[-1])


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


for i in range(int(input())):
	lst = list()
	n = input()
	lst.append(n[0])
	for i in range(1, len(n) - 2):
		if i % 2 != 0:
			lst.append(n[i])
	lst.append(n[len(n) - 1])
	print(*lst, sep='')


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


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


import sys
import math
sys.setrecursionlimit(1000000)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')
p2S = lambda x: print(*x, sep=' ')

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

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

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

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	_v_ = II()
	for ___ in range(_v_):
		s = SI()
		print(s[0], end='')
		for i in range(1, len(s), 2):
			print(s[i], end='')
		print()
main()


t = int(input())
for i in range(t):
	a = input()
	j = 1
	l = len(a)
	while j <= l:
		a = a[:j + 1] + a[j + 2:]
		j += 1
		l -= 1
	print(a)


for _ in range(int(input())):
	a = input()
	ans = []
	ans.append(a[0])
	i = 1
	while i < len(a) - 1:
		if a[i] == a[i + 1]:
			ans.append(a[i])
		i += 2
	ans.append(a[-1])
	print(''.join(ans))


n = int(input())
string = ''
for i in range(0, n):
	str1 = input()
	lis = list(str1)
	string = string + lis[0]
	for j in range(1, len(lis)):
		if j % 2 == 0:
			string = string + lis[j]
	string = string + lis[len(lis) - 1]
	print(string)
	string = ''


t = int(input())
for _ in range(t):
	b = input()
	ans = b[0:2]
	for x in range(3, len(b), 2):
		ans += b[x]
	print(ans)


for _ in range(int(input())):
	b = input()
	if len(b) < 3:
		a = b
	else:
		a = b[::2]
		a += b[-1]
	print(a)


for _ in range(int(input())):
	s = input()
	print(s[0], end='')
	for i in range(len(s)):
		if i % 2 != 0:
			print(s[i], end='')
	print('')


def original(s):
	result = ''
	for i in range(0, len(s) - 1, 2):
		result += s[i]
	result += s[-1]
	return result
for i in range(int(input())):
	print(original(input()))


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math

def get_int():
	return int(stdin.readline().strip())

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

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

def solve():
	st = input()
	ans = st[0]
	for val in st[1:len(st) - 1:2]:
		ans += val
	ans += st[-1]
	return ans

def main():
	print(solve())
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import factorial
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

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

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

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')

def main():
	for _ in range(N()):
		s = input()
		res = [s[0]]
		for i in range(1, len(s), 2):
			res.append(s[i])
		print(''.join(res))
main()


t = int(input())
for i in range(0, t):
	s = input()
	n = len(s)
	str = ''
	str += s[0]
	cnt = 0
	j = 1
	while j < n - 2:
		if s[j] != s[j + 1]:
			if cnt == 0:
				str += s[j]
			else:
				k = (cnt + 1) // 2
				str += s[j] * k
				cnt = 0
		else:
			cnt += 1
		j += 1
	if cnt == 0 and n != 2:
		str += s[n - 2:]
	else:
		if s[n - 3] == s[n - 2]:
			cnt += 1
		k = cnt // 2
		str += s[j] * k
		str += s[n - 1]
	print(str)


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


for i in range(int(input())):
	s = input()
	if len(s) == 2:
		print(s)
		continue
	ans = s[:2]
	for i in range(3, len(s), 2):
		ans += s[i]
	print(ans)


t = int(input())
for i in range(t):
	l = list(input())
	b = ''
	for i in range(len(l)):
		if i == 0 or i == 1:
			b += l[i]
		elif i % 2 == 1:
			b += l[i]
	print(b)


import sys
input = sys.stdin.readline
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(councils, a, k):
	summ = 0
	for x in a:
		summ += min(x, councils)
	return summ // councils >= k
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def solve():
	b = input().rstrip()
	a = ''
	a = a + b[0]
	for i in range(1, len(b), 2):
		a = a + b[i]
	if len(b) % 2 == 1:
		a = a + b[-1]
	print(a)
for _ in range(int(input())):
	solve()


tc = int(input())
for _ in range(tc):
	s = input()
	k = ''
	if len(s) == 2:
		print(s)
	else:
		for i in range(1, len(s) - 1, 2):
			k = k + s[i]
		print(s[0] + k + s[len(s) - 1])


class solution:

	def __init__(self, s):
		self.s = s

	def RemoveString(self):
		d = ''
		for i in self.s[::2]:
			d = d + i
		d = d + s[-1]
		print(d)
for _ in range(int(input())):
	s = input()
	root = solution(s)
	root.RemoveString()


def solve():
	s = input()
	x = ''
	x += s[0]
	for i in range(1, len(s), 2):
		x += s[i]
	print(x)
for _ in range(int(input())):
	solve()


t = int(input())
while t:
	string = input()
	if len(string) > 2:
		print(string[0:len(string):2] + string[-1])
	else:
		print(string)
	t -= 1


import math, string, itertools, operator, fractions, heapq, collections, re, array, bisect, sys, functools

def solve(line):
	a = [line[0]]
	for i in range(1, len(line) - 1, 2):
		a.append(line[i])
	a.append(line[-1])
	return ''.join(a)
T = int(sys.stdin.readline())
t = 0
while True:
	line = sys.stdin.readline().rstrip()
	if not line:
		break
	print(solve(line))
	t += 1


t = int(input())
for _ in range(t):
	n = input()
	l1 = []
	for i in range(0, len(n), 2):
		l2 = []
		l2.append(n[i])
		l1.append(l2)
	k = ''
	for i in range(len(l1)):
		k += l1[i][0]
	print(k + n[len(n) - 1])


from sys import stdin

def iinput():
	return int(stdin.readline())

def sinput():
	return input()

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

def linput():
	return list(map(int, stdin.readline().split()))
t = iinput()
while t:
	t -= 1
	s = input()
	a = s[0]
	for i in range(1, len(s) - 1, 2):
		a += s[i]
	a += s[-1]
	print(a)


for _ in range(int(input())):
	s = input()
	for c in s[::2]:
		print(c, end='')
	print(s[-1])


def solve():
	a = input()
	(q, w, a) = (a[0], a[-1], a[1:-1])
	for i in range(1, len(a) + 1, 2):
		q += a[i]
	return q + w
t = int(input())
ans = []
while t:
	ans.append(str(solve()))
	t -= 1
print('\n'.join(ans))


n = int(input())
for w in range(n):
	a = input()
	x = ''
	i = 0
	while i < len(a):
		if i == 0 or i == len(a) - 1:
			x += a[i]
			i = i + 1
		else:
			x = x + a[i]
			i = i + 2
	print(x)


t = int(input())
for i in range(t):

	def listToString(s):
		str1 = ''
		for ele in s:
			str1 += ele
		return str1
	b = input()
	b = list(b)
	del b[2:len(b) - 1:2]
	print(listToString(b))


t = int(input())
while t != 0:
	s = list(input())
	if len(s) == 2:
		print(''.join([str(e) for e in s]))
	else:
		first = s[0]
		i = 1
		while i <= len(s):
			first = first + s[i]
			i += 2
		print(first)
	t -= 1


import collections
import os
import sys
from io import BytesIO, IOBase
import math

def main():
	t = int(input())
	for _ in range(t):
		s = input()
		res = ''
		for i in range(0, len(s), 2):
			res += s[i]
		if len(s) & 1 == 0:
			res += s[-1]
		print(res)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


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


theNumber = int(input())
myList = []
for i in range(theNumber):
	a = input()
	myList.append(a)
for i in myList:
	theList = []
	for j in range(2, len(i), 2):
		tempVar = i[j - 2:j]
		tempVar = tempVar[0]
		theList.append(tempVar)
	oneMoreTemp = i[len(i) - 2:len(i)]
	str = ''
	print(str.join(theList) + oneMoreTemp)


import sys
import math as mt
t = int(input())
for __ in range(t):
	s = input()
	s1 = ''
	s1 += s[0]
	s1 += s[1]
	ch = 0
	for i in range(3, len(s)):
		if ch % 2 == 0:
			s1 += s[i]
		ch += 1
	print(s1)


from sys import stdin
stdin.readline()
for s in stdin:
	print(s[::2].replace('\n', s[-2]))


t = int(input())

def solve(b):
	ans = []
	for i in range(0, len(b), 2):
		ans.append(b[i])
	return ''.join(ans)
for _ in range(t):
	b = input()
	a = b[0] + solve(b[1:-1]) + b[-1]
	print(a)


nb_cases = int(input())
while nb_cases > 0:
	nb_cases -= 1
	b = input()
	mot = ''
	for pos in range(len(b)):
		if pos % 2 == 0:
			mot += b[pos]
	mot += b[len(b) - 1]
	print(mot)


t = int(input())
for q in range(t):
	ch = input()
	s = ''
	s += ch[0] + ch[1]
	for i in range(2, len(ch)):
		if i % 2:
			s += ch[i]
	print(s)


t = int(input())
for _ in range(t):
	s = input()
	l = list(s)
	j = 0
	l1 = []
	for i in range(2, len(l)):
		if j % 2 == 0:
			l1.append(i)
		j = j + 1
	l2 = []
	for i in range(len(l)):
		if i not in l1:
			l2.append(l[i])
	print(''.join(l2))


from functools import reduce
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
from collections import Counter
import collections
import math
import heapq
import re

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def most_frequent(list):
	return max(set(list), key=list.count)

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def Convert(string):
	li = list(string.split(''))
	return li

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
prime = []
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def main():
	for i in range(inin()):
		s = sin()
		if len(s) == 2:
			print(s)
			continue
		s = list(s)
		a = []
		for i in range(0, len(s), 2):
			a.append(s[i])
		for i in range(len(a)):
			print(a[i], end='')
		print(s[-1])
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


tc = int(input())
for _ in range(tc):
	b = list(input())
	a = [b.pop(0)]
	for i in range(0, len(b), 2):
		a.append(b[i])
	print(''.join(a))


def solve(b):
	ans = ''
	for i in range(0, len(b), 2):
		ans += b[i]
	ans += b[-1]
	return ans
for _ in range(int(input())):
	b = input()
	print(solve(b))


t = int(input())
while t > 0:
	t -= 1
	arr = list(input())
	x = 0
	ans = ''
	while x < len(arr):
		ans += arr[x]
		x += 2
	ans += arr[-1]
	print(ans)


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


m = int(input())
while m:
	n = input()
	str = ''
	for s in range(1, len(n) - 1):
		if s % 2 == 0:
			str = str + n[s]
	print(n[0] + str + n[-1])
	m = m - 1


t = int(input())
for _t in range(t):
	b = input()
	b = list(b)
	a = ''
	a = a + b[0] + b[1]
	l = len(b)
	if l > 2:
		for i in range(3, l, 2):
			a += b[i]
	print(a)


testcase = int(input())
for i in range(testcase):
	str1 = input()
	n = len(str1)
	final = '' + str1[0]
	for j in range(1, n - 1, 2):
		final += str1[j]
	final += str1[n - 1]
	print(final)


z = int(input())
for i in range(z):
	a = input()
	if len(a) > 2:
		print(a[0], end='')
		print(a[1::2])
	else:
		print(a)


n = int(input())

def solve(s):
	i = 1
	out = s[0]
	while i < len(s):
		out += s[i]
		i += 2
	return out
for i in range(n):
	s = input()
	print(solve(s))


n = int(input())
for _ in range(n):
	s = input()
	si = s[2:]
	res = ''
	for i in range(1, len(si), 2):
		res += si[i]
	s = s[0:2] + res
	print(s)


from sys import stdin

def r():
	return stdin.readline().strip()

def r_t(tp):
	return map(tp, r().strip().split())

def r_a(tp):
	return list(r_t(tp))

def main():
	cases = int(r())
	for case in range(cases):
		t = r()
		ans = t[:2]
		for i in range(3, len(t), 2):
			ans += t[i]
		print(ans)
main()


from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')

def solve():
	for _ in range(ii()):
		s = si()
		n = len(s)
		s1 = ''
		for i in range(n - 1, -1, -2):
			s1 += s[i]
		s1 += s[0]
		s1 = list(s1)
		s1.reverse()
		print(''.join(s1))
solve()


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


T = int(input())
for _ in range(T):
	B = input()
	A = B[0]
	C = B[-1]
	D = B[1:-1:2]
	print(A + D + C)


from sys import stdin, stdout
read = stdin.readline

def puts(x, end='\n'):
	stdout.write(x + end)

def read_int():
	return int(read())

def list_in():
	return [i for i in read().split()]

def int_list_in():
	return [int(i) for i in read().split()]

def solve():
	string = read().strip()
	i = 1
	selected = ''.join([string[i] for i in range(1, len(string) - 1, 2)] if len(string) > 2 else [])
	print(string[0] + selected + string[-1])
for i in range(read_int()):
	solve()


for _ in range(int(input())):
	s = input()
	b = [s[0]]
	for x in range(1, len(s) - 1, 2):
		b.append(s[x])
	b.append(s[-1])
	print(*b, sep='')


from sys import stdin as lector
input = lector.readlines()
l = int(input[0])
for i in range(1, l + 1):
	cadena = list(input[i])
	cadena.pop(-1)
	lc = len(cadena)
	pares = list(range(0, lc, 2)) + [-1]
	print(''.join(list(map(lambda x: cadena[x], pares))))


try:
	t = int(input())
	while t > 0:
		s = input()
		ans = ''
		for i in s[::2]:
			ans += i[0]
		print(ans + s[-1])
		t -= 1
except:
	pass


n = int(input())
for _ in range(0, n):
	s = input()
	l = len(s)
	a = s[0]
	i = 1
	while i < l - 1:
		if s[i] == s[i + 1]:
			a += s[i]
			i += 2
		else:
			a += s[i]
			i += 1
	a += s[l - 1]
	print(a)


import sys
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

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

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

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

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	for _ in range(II()):
		s = SI()
		ans = ''.join(s[::2]) + s[-1]
		print(ans)
main()


for T in range(int(input())):
	b = input()
	s = ''
	s += b[0]
	if len(b) == 2:
		print(b)
	else:
		for i in range(1, len(b)):
			if i % 2 != 0:
				s += b[i]
		print(s)


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


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


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


def short_subs(s):
	if len(s) == 2:
		return s
	else:
		l = list(s[1:-1])
		return s[0] + ''.join([l[i] for i in range(len(l)) if i % 2 == 0]) + s[-1]
t = int(input())
for t_itr in range(t):
	s = str(input())
	result = short_subs(s)
	print(result)


def gogo(text):
	res = ''
	res += text[0]
	for i in range(1, len(text) - 1, 2):
		res += text[i]
	return res + text[-1]
t = int(input())
for i in range(t):
	text = input()
	print(gogo(text))


from collections import defaultdict as dfd
import math
import sys
import heapq

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

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

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

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def main():
	for _ in range(int(input())):
		A = input()
		val = A[0:2]
		if len(A) > 2:
			for i in range(2, len(A)):
				if i % 2 != 0:
					val += A[i]
		print(val)
main()


for i in range(int(input())):
	l = []
	n = list(map(str, input()))
	for i in range(0, len(n), 2):
		l.append(n[i])
	l.append(n[-1])
	print(''.join(l))


Testcases = int(input())
for i in range(Testcases):
	B = input()
	N = len(B)
	if N == 2:
		print(B)
	else:
		print(B[0], end='')
		j = 1
		while j <= N:
			print(B[j], end='')
			j += 2
	print()


t = int(input())
for i in range(t):
	b = input()
	if len(b) == 2:
		print(b)
	else:
		stri = str(b[0:2])
		for z in range(3, len(b), 2):
			stri = stri + str(b[z])
		print(stri)


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


from textwrap import wrap
T = int(input())
for t in range(T):
	word = input()
	k = wrap(word, 2)
	final = []
	for x in range(0, len(k)):
		ans = str(k[x][1])
		final.append(ans)
	print(k[0][0] + ''.join(final))


for _ in range(int(input())):
	b = input()
	n = len(b)
	i = 0
	while i < n:
		print(b[i], sep='', end='')
		i += 2
	print(b[n - 1])


def solution():
	s = input()
	l = len(s)
	for i in range(l):
		if i == l - 1:
			print(s[i])
		elif i % 2 == 0:
			print(s[i], end='')
T = int(input())
while T:
	solution()
	T -= 1


for i in range(0, int(input())):
	x = list(input())
	for y in range(0, len(x), 2):
		print(x[y], end='')
	print(x[len(x) - 1])


t = int(input(''))
for i in range(t):
	a = ''
	b = str(input(''))
	if len(b) == 2:
		a = b
		print(a)
	else:
		for k in range(0, len(b), 2):
			a = a + b[k]
			if k == len(b) - 1:
				break
		a = a + b[len(b) - 1]
		print(a)


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


import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

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

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def def_value():
	return 0
t = inp()
for _ in range(t):
	b = input()
	res = b[0]
	for i in range(len(b)):
		if i % 2 != 0:
			res += b[i]
	print(res)


t = int(input())
for testcase in range(t):
	s = list(input())
	n = len(s)
	ans = []
	for i in range(n):
		if i == 0 or i % 2 == 1:
			ans.append(s[i])
	print(''.join(ans))


for _ in range(int(input())):
	s = list(input())
	a = []
	if len(s) > 2:
		print(s[0], s[1], sep='', end='')
		i = 3
		while i < len(s):
			print(s[i], end='')
			i += 2
		print()
	else:
		print(''.join(s))


n = int(input())
lis = []
for i in range(n):
	lis.append(input())
for a in lis:
	b = ''
	b += a[0]
	b += a[1]
	for i in range(3, len(a), 2):
		b += a[i]
	print(b)


def main():
	n = int(input())
	for i in range(n):
		each()

def each():
	b = input()
	if len(b) == 2:
		print(b)
	else:
		l = list(''.join(b))
		a = [l[0]]
		for i in range(1, len(b) - 2):
			if i % 2 == 1:
				a.append(l[i])
		a.append(l[-1])
		print(''.join(a))
main()


num = int(input())
for q in range(num):
	stringa = input()
	l = []
	snuova = ''
	for i in range(0, len(stringa), 2):
		snuova = stringa[i:i + 2]
		if len(snuova) == 2:
			l.append(snuova)
	soutput = ''
	for el in range(len(l)):
		if el < len(l) - 1:
			soutput += l[el][0]
		else:
			soutput += l[el]
	print(soutput)


num = eval(input())
a = ''
for i in range(num):
	s = input()
	if len(s) < 4:
		print(s)
	else:
		a += s[0]
		for j in range(1, len(s) - 1, 2):
			a += s[j]
		a += s[len(s) - 1]
		print(a)
		a = ''


n = int(input())
for i in range(n):
	res = str()
	s = str(input())
	res = s[0:2]
	for i in range(3, len(s), 2):
		res += s[i]
	print(res)


t = int(input())
listnew = []
for i in range(0, t):
	n = input()
	list1 = list()
	list2 = []
	s = ''
	for i in n:
		list1.append(i)
	for i in range(0, int(len(list1) / 2)):
		if i % 2 == 0:
			list2.append(list1[2 * i] + list1[2 * i + 1])
	if len(list1) % 4 == 0:
		for i in list2:
			s = s + i
		s = s + '{}'.format(list1[-1])
	else:
		for i in list2:
			s += i
	listnew.append(s)
for i in listnew:
	print(i)


def solve(init):
	result = init[0]
	for i in range(1, len(init), 2):
		result += init[i]
	return result
N = int(input())
list = []
for i in range(N):
	list.append(input())
for i in range(N):
	print(solve(list[i]))


def main():
	t = int(input())
	for __ in range(t):
		s = input()
		n = len(s)
		a = [s[0]]
		i = 1
		while i < n - 1:
			if s[i] == s[i + 1]:
				a.append(s[i])
				i += 2
			else:
				i += 1
		a.append(s[-1])
		print(''.join(a))
main()


def func(b):
	a = ''
	for i in range(len(b)):
		if i % 2 == 0:
			a += b[i]
	a += b[-1]
	print(a)
t = int(input())
for i in range(t):
	b = input()
	func(b)


from sys import stdin, stdout
for test in range(int(stdin.readline())):
	b = input()
	a = b[:2]
	for i in range(3, len(b), 2):
		a = a + b[i]
	stdout.write(a + '\n')


import math
for _ in range(int(input())):
	s = input()
	print(s[0] + s[1::2])


for _ in range(int(input())):
	s = input()
	if len(s) == 2:
		print(s)
	else:
		a = s[:2]
		for i in range(3, len(s)):
			if i % 2 != 0:
				a += s[i]
		print(a)


from fractions import Fraction
import bisect
import os
import io
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
from queue import Queue

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

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

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
t = 1
t = iinput()
for _ in range(t):
	s = input()
	n = len(s)
	ans = s[0]
	i = 1
	while i < n - 1:
		ans += s[i]
		i += 2
	ans += s[n - 1]
	print(ans)


def combination_check(string):
	hist = dict()
	condition = True
	for i in range(1, len(string) - 1):
		hist[string[i]] = hist.get(string[i], 0) + 1
	for value in list(hist.values()):
		if value % 2 != 0:
			condition = False
			break
	return condition
test = int(input())
for i in range(test):
	string = input()
	if len(string) <= 3:
		print(string)
	elif combination_check(string):
		last = string[len(string) - 2:len(string)]
		mid_sec = string[:len(string) - 2]
		mid_sec = mid_sec[:len(mid_sec):2]
		print(mid_sec + last)
	else:
		print(string)


T = int(input())
for _ in range(1, T + 1):
	str = input()
	answer = []
	lastletter = str[-1]
	answer.append(str[0])
	str = str[1:-1]
	for i in range(0, len(str), 2):
		answer.append(str[i])
	answer.append(lastletter)
	print(''.join(answer))


for testcase in range(int(input())):
	s = input()
	if len(s) == 2:
		print(s)
	else:
		i = 1
		ans = s[0]
		while i < len(s) - 1:
			ans += s[i]
			i += 2
		ans += s[-1]
		print(ans)


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


t = int(input())
for i in range(t):
	b = input()
	start = b[0]
	end = b[-1]
	print(start + b[1:-1:2] + end)


def get_substring(b):
	inner = b[1:-1]
	a = ''
	i = 0
	while i < len(inner) - 1:
		if inner[i] == inner[i + 1]:
			a += inner[i]
			i += 2
	return b[0] + a + b[-1]
t = int(input())
for _ in range(t):
	b = input()
	print(get_substring(b))


t = int(input())
totals = []
for i in range(t):
	b = input()
	new_b = b[0]
	q = False
	for e in b:
		if q:
			new_b += e
			q = False
		else:
			q = True
	totals.append(new_b)
for i in range(t):
	print(totals[i])


for _ in range(int(input())):
	x = list(input())
	if len(x) == 2:
		print(''.join(x))
	else:
		p = [x[0]]
		for i in range(1, len(x) - 1, 2):
			p.append(x[i])
		p.append(x[-1])
		print(''.join(p))


for _ in range(int(input())):
	s = input()
	ss = ''
	for i in range(0, len(s), 2):
		ss += s[i]
	print(ss, s[-1], sep='')


t = int(input())
for q in range(0, t):
	a = input()
	s = []
	s.append(a[0])
	s.append(a[1])
	for i in range(3, len(a), 2):
		s.append(a[i])
	print(*s, sep='')


test_cases = int(input())
for i in range(0, test_cases):
	strb = input()
	stra = strb[0] + strb[1]
	for j in range(3, len(strb)):
		if j % 2 == 0:
			continue
		else:
			stra = stra + strb[j]
	print(stra)


import sys
input = sys.stdin.readline

def solve():
	string = input()
	final = ''
	n = len(string)
	for k in range(n - 1):
		if k == 0 or k == n - 2 or k % 2 == 0:
			final += string[k]
	print(final)
test = int(input())
while test != 0:
	solve()
	test -= 1


t = int(input())
for i in range(t):
	s = str(input())
	l = len(s)
	ns = ''
	ns = s[0] + s[1]
	if l > 2:
		for j in range(3, l, 2):
			ns = ns + s[j]
	print(ns)


t = int(input())
for t in range(0, t):
	b = list(input())
	if len(b) == 2:
		a = str(b[0])
		a = a + str(b[1])
	else:
		x = b.pop(0)
		y = b.pop(len(b) - 1)
		a = str(x)
		for i in range(0, len(b) - 1, 2):
			a = a + str(b[i])
		a = a + str(y)
	print(a)


t = int(input())
for _ in range(t):
	p = input()
	n = len(p)
	d = p[0]
	i = 1
	while i < n - 1:
		d += p[i]
		i += 2
	d += p[-1]
	print(d)


n = int(input())
for i in range(n):
	s = ''
	k = input()
	s += str(k[:2])
	for x in k[3::2]:
		s += x
	print(s)


def read_ints():
	return list(map(int, input().split()))
for _ in range(int(input())):
	joined = input()
	new_str = ''
	if len(joined) <= 2:
		print(joined)
	else:
		for i in range(len(joined)):
			if not i % 2 or i == len(joined) - 1:
				new_str = new_str + joined[i]
		print(new_str)


for _ in range(int(input())):
	s = input()
	s1 = ''
	k = 0
	n = len(s)
	while k < n:
		s1 = s1 + s[k]
		k = k + 2
	print(s1 + s[n - 1])


t = int(input())
for h in range(t):
	b = input()
	a = ''
	a = a + b[0]
	k = len(b)
	for m in range(1, k - 1, 2):
		a = a + b[m]
	a = a + b[k - 1]
	print(a)


for _ in range(int(input().strip())):
	st = input().strip()
	n = len(st)
	ans = st[0]
	for i in range(1, n, 2):
		ans += st[i]
	print(ans)


t = int(input())
ans = [0] * t
for i in range(t):
	s = input()
	r = ''
	r += s[0] + s[1]
	for j in range(3, len(s), 2):
		r += s[j]
	ans[i] = r
for i in ans:
	print(i)


T = int(input())
for _ in range(T):
	result = ''
	inputstr = input()
	if len(inputstr) == 2:
		print(inputstr)
	else:
		result += inputstr[0]
		result += inputstr[1::2]
		print(result)


def findA(b):
	a = ''
	for idx in range(len(b) - 1):
		if idx % 2 == 1:
			continue
		a += b[idx]
	a += b[-1]
	print(a)
tests = []
numTests = int(input())
for testCase in range(numTests):
	tests.append(input())
for case in tests:
	findA(case)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	s = input()
	n = len(s)
	ans = list(s[0])
	for i in range(0, n, 2):
		ans.append(s[i + 1])
	print(*ans, sep='')


n = int(input())
for i in range(n):
	a = input()
	s1 = a[0]
	s2 = a[-1]
	a = a[:0] + a[1:]
	a = a[:-1]
	f = a
	for i in set(a):
		f = f.replace(i * 2, i)
	f += s2
	f = s1 + f
	print(f)


n = int(input())
for i in range(n):
	s = str(input())
	new = ''
	if len(s) == 2:
		print(s)
	if len(s) > 2:
		last = s[len(s) - 2:len(s)]
		for i in range(0, len(s) - 2, 2):
			new = new + s[i]
		new = new + last
		print(new)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def gcd(a, b):
	if a == b:
		return a
	while b > 0:
		(a, b) = (b, a % b)
	return a

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
dx = [0, 0, 1, -1]
dy = [1, -1, 0, 0]

def YES():
	print('YES')

def NO():
	print('NO')

def Yes():
	print('Yes')

def No():
	print('No')
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24

def lcm(a, b):
	return abs(a // gcd(a, b) * b)

def solve():
	s = inp()
	ans = []
	for i in range(0, len(s), 2):
		ans.append(s[i])
	ans.append(s[-1])
	print(''.join(ans))
testcase(int(inp()))


final = list()
n = int(input())
for x in range(1, n + 1):
	b = list()
	c = ''
	a = input()
	s = 1
	for i in range(1, len(a), 2):
		b.append(a[i - 1:i + 1])
	for i in b:
		if s == len(b):
			c = c + i
		else:
			c = c + i[0]
			s = s + 1
	final.append(c)
for i in final:
	print(i)


import sys
t = int(sys.stdin.readline())
while t:
	b = sys.stdin.readline()
	ans = b[0] + b[1]
	for i in range(2, len(b)):
		if i % 2 == 1:
			ans += b[i]
	print(ans)
	t -= 1


t = int(input())
ans = []
for i in range(t):
	a = input()
	m = ''
	for i in range(len(a)):
		if i == 0 or i == len(a) - 1:
			m += a[i]
		elif i % 2 != 0:
			m += a[i]
	ans.append(m)
for i in ans:
	print(i)


import io
import os
from collections import Counter, defaultdict, deque

def solve(B):
	B = deque(B)
	B.appendleft(B[0])
	B.append(B[-1])
	ans = []
	for i in range(0, len(B), 2):
		ans.append(B[i])
	return ''.join(ans)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	B = input().decode().rstrip()
	ans = solve(B)
	print(ans)


for ii in range(int(input())):
	b = input()
	s = ''
	i = 0
	while i < len(b) - 1:
		if b[i] == b[i + 1]:
			s += b[i]
			i += 2
		else:
			s += b[i]
			i += 1
	print(s + b[len(b) - 1])


def starc(s):
	ns = set(s)
	if s.count(s[0]) == len(s):
		return s[0] * (len(s) // 2 + 1)
	else:
		for i in ns:
			s = s.replace(i * 2, i)
		return s
tc = int(input())
for i in range(tc):
	ss = input()
	print(starc(ss))


for _ in range(int(input())):
	b = input()
	l = len(b)
	for i in range(0, l - 2, 2):
		print(b[i], end='')
	print(b[l - 2:l])


for t in [*open(0)][1:]:
	print(t[:-1:2] + t[-2])


def run():
	s = input()
	print(s[0], end='')
	for (i, c) in enumerate(s):
		if i % 2:
			print(c, end='')
	print()
t = int(input())
for i in range(t):
	run()


from sys import stdin, stdout
for query in range(int(stdin.readline())):
	b = list(stdin.readline().strip())
	stdout.write(b[0])
	n = len(b)
	for char in range(1, n, 2):
		stdout.write(b[char])
	stdout.write('\n')


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
prime = []

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	s = stin()
	n = []
	for i in range(len(s)):
		if i == 0 or i == len(s) - 1:
			n.append(s[i])
		elif s[i] == s[i + 1] and i % 2 != 0:
			n.append(s[i])
	print(''.join(n))


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	b = input().rstrip('\n')
	print(b[0] + b[1:len(b):2])


t = int(input())
for t1 in range(t):
	n = str(input())
	a = ''
	i = 0
	while i <= len(n) - 1:
		if i == 0:
			a = a + n[i]
			i = i + 1
		elif i == len(n) - 1:
			a = a + n[i]
			i = i + 1
		else:
			a = a + n[i]
			i = i + 2
	print(a)


t = int(input())
while t:
	b = input()
	leb = len(b)
	if leb == 2:
		print(b)
	else:
		i = 0
		a = ''
		while i < leb:
			a += b[i]
			i += 2
		if leb % 2 == 0:
			a += b[-1]
		print(a)
	t -= 1


for _ in range(int(input())):
	b1 = list(input())
	a1 = []
	a1.append(b1[0])
	k = len(b1)
	if k == 2:
		print(''.join((str(i) for i in b1)))
	else:
		for j in range(1, k - 1, 2):
			a1.append(b1[j])
		a1.append(b1[k - 1])
		print(''.join((str(i) for i in a1)))


t = int(input())
for i in range(t):
	s = input()
	ans = s[0]
	f = 2
	for i in s[1:]:
		if f == 2:
			ans += i
			f = 1
		else:
			f += 1
	print(ans)


from collections import OrderedDict
tc = int(input())
for i in range(tc):
	a = input()
	my_list = ''
	for j in range(0, len(a), 2):
		my_list += a[j]
	my_list += a[len(a) - 1]
	print(my_list)


a = int(input())
c = []
for i in range(a):
	b = input()
	c.append(b)
for i in range(a):
	text = ''
	for j in range(int(len(c[i]) / 2)):
		text += c[i][2 * j]
	text += c[i][len(c[i]) - 1]
	print(text)


t = int(input())
for _ in range(t):
	b = input()
	a = b[:2]
	i = 3
	while i < len(b) - 1:
		a += b[i]
		i += 2
	if len(b) > 2:
		a += b[-1]
	print(a)


t = int(input())
while t > 0:
	s = input()
	if len(s) == 2:
		print(s)
	else:
		temp_1 = []
		temp_1.append(s[0])
		temp_2 = s[-1]
		temp_3 = s[1:-1]
		for i in range(len(temp_3)):
			if i % 2 == 0:
				temp_1.append(temp_3[i])
		temp_1.append(temp_2)
		print(''.join(temp_1))
	t = t - 1


for _ in range(int(input())):
	st = str(input())
	if len(st) == 2:
		ans = st
	else:
		ans = st[0]
		for i in range(len(st) - 2):
			if i & 1 == 0:
				continue
			else:
				ans = ans + st[i]
		ans = ans + st[-1]
	print(ans)


for _ in range(int(input())):
	s = input()
	l = []
	n = len(s)
	l.append(s[0])
	for i in range(1, n - 1, 2):
		l.append(s[i])
	l.append(s[n - 1])
	print(''.join(l))


t = int(input())
lst = []
for i in range(t):
	s = input()
	lst.append(s)
for i in lst:
	if len(i) > 3:
		s2 = i[0]
		for j in range(1, len(i) - 1):
			if j % 2 != 0:
				if i[j] == i[j + 1]:
					s2 += i[j]
		s2 += i[-1]
		print(s2)
	else:
		print(i)


t = int(input())
for _ in range(t):
	b = input()
	a = [b[0]]
	for i in range(1, len(b), 2):
		a.append(b[i])
	for (i, val) in enumerate(a):
		print(val, end='')
	print()


t = int(input())
for i in range(t):
	st = input()
	n = len(st)
	s = st[0] + st[1]
	for c in range(3, n, 2):
		s += st[c]
	print(s)


t = int(input())
for i in range(t):
	b = input()
	j = 1
	while j < len(b):
		if b[j] == b[j - 1]:
			print(b[j], end='')
			j += 2
		else:
			print(b[j - 1], end='')
			j += 1
	if len(b) - 1 < j:
		print(b[-1])


import sys

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

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

def input():
	return sys.stdin.readline().strip()
import math
for _ in range(int(input())):
	b = input()
	ans = ''
	ans += b[0]
	for i in range(1, len(b) - 1, 2):
		ans += b[i]
	ans += b[len(b) - 1]
	print(ans)


import textwrap
test = int(input())
for i in range(test):
	s = input()
	S = ''
	lis = textwrap.wrap(s, 2)
	i = 0
	while i < len(lis):
		r = lis[i][0]
		S = S + r
		i += 1
	r = len(s)
	S = S + s[r - 1]
	print(S)


for _ in range(int(input())):
	s = input()
	l = [i for i in s]
	newl = [l[0]] + l[1:-1:2] + [l[-1]]
	print(''.join(newl))


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 _ in range(int(input())):
	b = input()
	s = b[:2] + b[3::2]
	print(s)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def solve(t):
	ans = t[0]
	for i in range(1, len(t) - 1, 2):
		ans += t[i]
	ans += t[-1]
	print(ans)
T = inp()
tests = []
for _ in range(T):
	tests.append(insr())
for t in tests:
	solve(t)


for _ in range(int(input())):
	s = input()
	n = len(s)
	x = ''
	x = s[0]
	i = 0
	for i in range(n - 1):
		if i % 2 == 1:
			x += s[i]
	x += s[-1]
	print(x)


t = int(input())
for test in range(t):
	s = input()
	n = len(s)
	li = []
	if n == 2:
		print(s)
	else:
		for i in range(0, n, 2):
			li.append(s[i])
		li.append(s[n - 1])
		res = ''.join(map(str, li))
		print(res)


t = int(input())
str = []
for i in range(0, t):
	str.append(input())
for i in range(0, t):
	if len(str[i]) <= 2:
		print(''.join(str[i]))
	else:
		result = []
		for j in range(0, len(str[i])):
			if j == 0 or j % 2 != 0:
				result.append(str[i][j])
		print(''.join(result))


for _ in range(int(input())):
	a = input()
	x = a[0] + a[1::2]
	print(x)


import sys
import math
from collections import defaultdict

def solve(test):
	b = input()
	if len(b) == 2:
		print(b)
		return
	a = b[:2]
	for i in range(3, len(b), 2):
		a += b[i]
	print(a)
test_cases = int(input())
for t in range(1, test_cases + 1):
	solve(t)


n = int(input())
for num in range(n):
	a = input()
	c = ''
	c += a[0] + a[1:len(a) - 1:2] + a[-1:]
	print(c)


for _ in range(int(input())):
	x = input()
	if len(x) <= 2:
		print(x)
	else:
		c = 0
		ans = []
		for i in range(len(x)):
			if c % 2 == 0:
				ans.append(x[i])
			c += 1
		ans.append(x[-1])
		ans = ''.join(ans)
		print(ans)


n = int(input())
for i in range(n):
	s = input()
	for i in range(len(s)):
		if i % 2 == 0 or i == len(s) - 1:
			print(s[i], end='')
	print()


from sys import stdin, stdout
from math import pi
Pi = lambda x: stdout.write(str(x) + '\n')
Ps = lambda x: stdout.write(str(x))
S = lambda x: x * (x + 1) // 2
I = lambda x: 1 + 2 * x
R = lambda : stdin.readline()
Ri = lambda x: map(int, x.split())
Rs = lambda x: map(str, x.split())
Rf = lambda x: map(float, x.split())
char = lambda x, y: ord(x) - ord(y)
gcd = lambda a, b: a if b == 0 else gcd(b, a % b)
lcm = lambda a, b: a * b // gcd(a, b)
distance = lambda a, b, c, d: (a - c) ** 2 + (b - d) ** 2
MaxN = int(1000000.0) + 10
mod = int(1000000000.0) + 7

def main():
	for x in stdin:
		n = int(x)
		for i in range(n):
			s = R().strip('\n')
			ans = s[0]
			for j in range(1, len(s), 2):
				ans += s[j]
			Pi(ans)
main()


a = int(input())
for x in range(a):
	b = input()
	j = ''
	d = len(b)
	if d % 2 == 0:
		for z in range(0, d, 2):
			j += b[z]
		j += b[d - 1]
	else:
		for z in range(0, d, 2):
			j += b[z]
	print(j)


from sys import stdin
num_tests = int(stdin.readline())

def get_original():
	a = ''
	b = stdin.readline().rstrip('\n')
	for i in range(len(b)):
		if not i % 2:
			a += b[i]
		elif i == len(b) - 1:
			a += b[i]
	print(a)
for _ in range(num_tests):
	get_original()


from collections import *
import sys

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
t = ri()
for _ in range(t):
	s = input()
	ans = s[:2]
	for i in range(3, len(s)):
		if i % 2 == 1:
			ans += s[i]
	print(ans)


import sys
input = sys.stdin.readline
ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda : int(input())
ip = lambda : [int(w) for w in input().split()]
f = []
for _ in range(inp()):
	s = input()
	ans = s[0]
	for i in range(1, len(s) - 1, 2):
		ans += s[i]
	ans += s[-1]
	f.append(ans)
[print(i) for i in f]


q = int(input())
for _ in range(q):
	st = input()
	print(st[0:-1:2] + st[-1])


def main():
	n = int(input())
	for i in range(n):
		string = list(input())
		if len(string) == 2:
			print(string[0] + string[1])
		else:
			respuesta = string[0]
			i = 1
			while i < len(string):
				respuesta = respuesta + string[i]
				i = i + 2
			print(respuesta)
main()


def task_A():
	t = int(input())
	for _ in range(t):
		bob_string = input()
		if len(bob_string) == 2:
			print(bob_string)
		else:
			alice_string = ''
			for i in range(len(bob_string) - 1):
				if i % 2 == 0:
					alice_string += bob_string[i]
			alice_string += bob_string[-1]
			print(alice_string)

def main():
	task_A()
main()


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


n = int(input())
for i in range(n):
	t = input()
	c = print(t) if len(t) == 2 else print(''.join(t[::2]) + t[-1])


t = int(input())
for _ in range(t):
	n = input()
	l = len(n)
	nl = []
	for i in range(0, l, 2):
		nl.append(n[i])
	if l % 2 == 0:
		nl.append(n[l - 1])
	print(''.join(nl))


t = int(input())
while t:
	t -= 1
	a = input()
	k = a[0]
	(i, l) = (0, len(a) - 1)
	f = 0
	if l == 1:
		print(a)
		continue
	for i in range(1, len(a), 2):
		k += a[i]
	print(k)


t = int(input())
for i in range(t):
	a = input()
	ans = a[0] + a[1]
	j = 3
	while j < len(a):
		ans = ans + a[j]
		j = j + 2
	print(ans)


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


for _ in range(int(input())):
	s = input()
	a = str(s[0] + s[1])
	for i in range(3, len(s)):
		if i % 2 != 0:
			a = a + s[i]
	print(a)


for i in range(int(input())):
	i = input()
	d = []
	if len(i) > 2 and len(i) % 2 == 0:
		d.append(i[0::2])
		d.append(i[-1])
	elif len(i) == 2:
		d.append(i)
	else:
		d.append(i[0::2])
	print(''.join(d))


n = int(input())
for i in range(1, n + 1):
	text = str(input())
	l = len(text)
	new_text = ''
	new_text += text[0] + text[1]
	for j in range(0, l):
		if l % 2 == 0:
			if j > 1:
				if not j % 2 == 0:
					new_text += text[j]
		else:
			if j > 1:
				if not j % 2 == 0:
					new_text += text[j]
			if j == l - 1:
				new_text += text[l - 1]
	print(new_text)


def main():
	times = int(input())
	for i in range(times):
		x = str(input())
		print(x[0] + x[1:len(x) - 1:2] + x[len(x) - 1])
main()


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


for _ in range(int(input())):
	s = input()
	if len(s) > 2:
		start = s[0]
		end = s[len(s) - 1]
		mid = ''
		for i in range(1, len(s) - 1, 2):
			mid += s[i]
		print(start + mid + end)
	else:
		print(s)


t = int(input())
for _ in range(t):
	s = input()
	ans = s[0]
	for i in range(len(s) - 1):
		try:
			ans += s[2 * i + 1]
		except IndexError:
			break
	print(ans)


t = int(input())
for _ in range(t):
	s = input()
	z = ''
	x = len(s)
	x = x / 2
	x = x - 1
	i = 0
	while x > 0:
		z += s[i]
		i += 2
		x = x - 1
	z += s[-2]
	z += s[-1]
	print(z)


t = int(input())
a = ''
for i in range(t):
	s = input()
	x = s[0] + s[1]
	for j in range(3, len(s), 2):
		x = x + s[j]
	print(x)


a = int(input())
for i in range(a):
	b = input()
	c = str(b[0])
	d = ''
	for j in b[1::2]:
		c += j
	print(c)


t = int(input())
if t <= 1000:
	count = True
	c = 0
	while c < t:
		b = list(input())
		a = ''
		for i in range(0, len(b)):
			if len(b) == 2:
				a = a + b[i]
				a = a + b[i + 1]
				break
			elif i == 0:
				a = a + b[i]
			elif i % 2 != 0:
				a = a + b[i]
		print(a)
		c = c + 1


import sys
t = int(sys.stdin.readline().split()[0])
tests = []
for line in sys.stdin:
	for word in line.split():
		tests.append(word)
for test in tests:
	if len(test) == 2:
		print(test)
	else:
		j = 0
		while j <= len(test):
			print(test[j:j + 2], end='')
			if j == len(test) - 4:
				j += 3
			else:
				j += 4
		print()


t = int(input())
for i in range(t):
	s = input()
	ko = len(s)
	s1 = s
	s1 = s1[1:]
	s1 = s1[:-1]
	k = list(s1)
	m = len(k)
	ne = []
	j = 0
	st = ''
	for j in range(m):
		if j % 2 != 0:
			ne.append(k[j])
	for el in ne:
		st += el
	final = s[0] + st + s[ko - 1]
	print(final)


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


def solve(b):
	ans = b[0]
	for i in range(1, len(b) - 1, 2):
		ans += b[i]
	ans += b[-1]
	return ans

def main():
	inp = lambda : [int(x) for x in input().split()]
	inn = lambda : int(input())
	for _ in range(inn()):
		b = input()
		print(solve(b))
main()


f = int(input())
for q in range(f):
	n = input()
	for i in range(0, len(n), 4):
		print(n[i], end='')
		if i != len(n) - 1:
			print(n[i + 1], end='')
	if len(n) % 4 == 0:
		print(n[-1])
	print()


def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
entries = inp()
for i in range(entries):
	s = insr()
	res = []
	j = 0
	while j < len(s):
		res.append(s[j])
		j += 2
	res.append(s[len(s) - 1])
	tmp = ''
	for x in res:
		tmp += x
	print(tmp)


for _ in range(int(input())):
	b = input()
	n = len(b)
	if n == 2:
		print(b)
	elif n > 2:
		a = b[:2]
		for i in range(3, len(b), 2):
			a += b[i]
		print(a)


import os
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

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

def iin():
	return int(sin())
p = print
MAX = float('inf')
MIN = float('-inf')

def readTree(n):
	adj = [set() for _ in range(n)]
	for _ in range(n - 1):
		(u, v) = ain()
		adj[u - 1].add(v - 1)
		adj[v - 1].add(u - 1)
	return adj

def main():
	for _ in range(iin()):
		s = sin()
		if len(s) == 2:
			print(s)
		else:
			a = s[:2]
			for i in range(3, len(s), 2):
				a += s[i]
			print(a)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for _ in range(int(input())):
	b = input()
	if len(b) == 2:
		print(b)
	else:
		s = ''
		s += b[:2]
		r = b[2:]
		for j in range(len(r)):
			if j % 2 != 0:
				s += r[j]
		print(s)


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


for _ in range(int(input())):
	str = input()
	n = len(str)
	j = 1
	s1 = '' + str[0]
	while j < n - 1:
		if str[j] == str[j + 1]:
			j += 1
		s1 += str[j]
		j += 1
	if len(str) > 1:
		s1 += str[n - 1]
	print(s1)


a = input()
for x in range(int(a)):
	b = input()
	ans = ''
	for i in range(0, len(b), 2):
		if i == 0:
			ans += b[i] + b[i + 1]
		elif b[i] == b[i - 1]:
			ans += b[i + 1]
		else:
			ans += b[i] + b[i + 1]
	print(ans)


k = int(input())
for i in range(k):
	m = input()
	x = len(m)
	if len(m) <= 2:
		print(m)
	else:
		print(m[0], end='')
		for j in range(1, x - 1, 2):
			print(m[j], end='')
		print(m[x - 1])


for i in range(int(input())):
	st = input()
	result = ''
	for k in range(0, len(st), 2):
		result += st[k]
	print(result + st[-1])


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


for _ in range(int(input())):
	b = input()
	a = b[:2]
	for i in range(2, len(b)):
		if i % 2 == 0:
			continue
		a += b[i]
	print(a)


for i in range(int(input())):
	t = str(input())
	l = list(t)
	k = []
	a = l[0]
	b = l[-1]
	l1 = l[1:len(l) - 1]
	if len(l) == 2:
		print(l[0] + l[-1])
	else:
		for i in range(len(l1)):
			if i % 2 == 0:
				k.append(l1[i])
		m = ''
		for i in k:
			m = m + i
		print(l[0] + m + l[-1])


n = int(input())
for i in range(n):
	a = input()
	j = 1
	while j < len(a) - 1:
		if a[j] == a[j + 1]:
			a = a[:j + 1] + a[j + 2:]
			j = j + 1
	print(a)


for _ in range(int(input())):
	a = list(input())
	ans = a[0]
	for i in range(0, len(a)):
		if i % 2 == 1:
			ans += a[i]
	print(''.join(ans))


def getAns(s):
	return ''.join(map(lambda i: s[2 * i], range(len(s) // 2))) + s[-1]

def main():
	t = int(input())
	anss = [''] * t
	for i in range(t):
		s = input()
		anss[i] = getAns(s)
	for ans in anss:
		print(ans)
main()


from itertools import combinations
x = int(input())
for test in range(x):
	s = input()
	k = len(s)
	flag = 0
	str = ''
	if k == 2:
		flag = 1
		print(s)
	else:
		l = k // 2
		for i in range(l):
			j = 2 * i
			str += s[j]
		str += s[-1]
		print(str)


x = int(input())
while x:
	x = x - 1
	y = input()
	r = y[0]
	for i in range(0, len(y)):
		if i % 2 != 0:
			r = r + y[i]
	print(r)


T = int(input())
for q in range(T):
	a = input()
	b = '' + a[0]
	count = 1
	repeat = 0
	while count < len(a) - 1:
		if a[count] == a[count - 1] and repeat < 1:
			count += 1
			repeat += 1
			continue
		else:
			b += a[count]
			repeat = 0
			count += 1
	b += a[len(a) - 1]
	print(b)


for _ in range(int(input())):
	S = str(input())
	l = list(S)
	l1 = []
	l1.append(l[0])
	for i in range(1, len(l) - 1):
		if l[i] == l[i + 1] and i % 2 == 1:
			l1.append(l[i])
	l1.append(l[len(l) - 1])
	for i in range(len(l1)):
		print(l1[i], end='')
	print()


numberofinput = int(input())
for iteratr in range(numberofinput):
	givenstring = input()
	assumedstring = ''
	for itera in range(2):
		assumedstring = assumedstring + givenstring[itera]
	itera = 3
	for iterrr in range(itera, len(givenstring), 2):
		assumedstring = assumedstring + givenstring[iterrr]
	print(assumedstring)


test_case = int(input())
for i in range(test_case):
	sub_string_b = input()
	output = ' '
	(first, last) = (sub_string_b[0], sub_string_b[-1])
	lenght_str = len(sub_string_b) - 2
	output = first
	if lenght_str == 0 or lenght_str < 0:
		output += last
	else:
		j = 1
		while j <= lenght_str:
			output += list(set(sub_string_b[j:j + 2]))[0]
			j = j + 2
		output += last
	print(output)


n = int(input())
l = []
for i in range(0, n):
	s = input()
	l.append(s)
for i in l:
	st = ''
	st = st + i[0:2]
	for j in range(3, len(i), 2):
		st = st + i[j]
	print(st)


T = int(input())
for _ in range(T):
	b = input()
	ans = []
	for i in range(len(b)):
		if i == 0 or i == len(b) - 1:
			ans.append(b[i])
		elif i % 2 == 0:
			ans.append(b[i])
	print(''.join(ans))


n = int(input())
b = 0
s = ''
lst = []
for i in range(n):
	lst = []
	s = ''
	n1 = input()
	for i in n1:
		s = s + i
		b = b + 1
		if b == 2:
			lst.append(s)
			b = 0
			s = ''
	for j in range(len(lst) - 1):
		if lst[j][1] == lst[j + 1][0]:
			s += lst[j][0]
		else:
			s += lst[j]
	print(s + lst[-1])


for _ in range(int(input())):
	li = list(str(input()))
	for i in range(2, len(li), 2):
		if li[i] == li[i - 1]:
			li[i] = '0'
	st = ''
	st = st.join(li)
	st = st.replace('0', '')
	print(st)


n = int(input())
for _ in range(n):
	b = input()
	s = []
	i = 0
	if len(b) == 1:
		print(b)
		continue
	while i < len(b) - 1:
		s.append((b[i], b[i + 1]))
		i += 2
	q = ''
	for i in range(len(s)):
		if len(s) - i == 1:
			q += s[i][0]
			q += s[i][1]
		else:
			q += s[i][0]
	print(q)


n = int(input())
l = []
for i in range(n):
	ind = 0
	a = ''
	b = str(input())
	c = len(b)
	for j in range(int(c / 2)):
		a = a + b[ind * 2]
		ind += 1
	a = a + b[c - 1]
	l.append(a)
for i in l:
	print(i)


test_cases = int(input())
for t in range(test_cases):
	b = input()
	print(b[0] + b[1:len(b):2])


noTestCases = int(input())
for testCase in range(noTestCases):
	stringB = input()
	stringA = stringB[0::2] + stringB[-1]
	print(stringA)


t = input()
t = int(t)
for t1 in range(t):
	s = input()
	s1 = s[0]
	for i in range(len(s) - 1):
		if i % 2 != 0:
			s1 = s1 + s[i]
	s1 = s1 + s[len(s) - 1]
	print(s1)


t = int(input())
while t:
	s = input()
	sl = s[1:-1]
	new = s[0]
	for i in range(len(s) - 2):
		if i % 2 != 0:
			new = new + sl[i]
	new = new + s[-1]
	print(new)
	t -= 1


def get_val(intarr):
	b = ''
	b += intarr[0]
	for j in range(1, len(intarr) - 1, 2):
		b += intarr[j]
	b += intarr[len(intarr) - 1]
	return b
n = int(input())
for i in range(n):
	a = input()
	arr = get_val(a)
	print(arr)


test = int(input())
for _ in range(test):
	s = input()
	ans = ''
	for x in range(0, len(s), 2):
		ans += s[x]
	ans += s[len(s) - 1]
	print(ans)


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


def string(substring):
	l2 = []
	l1 = [i for i in substring]
	for i in range(len(l1)):
		if i % 2 == 0:
			l2.append(l1[i])
	l2.append(l1[-1])
	joined = ''.join(l2)
	return joined
input_n = int(input())
for i in range(input_n):
	words = input()
	print(string(words))


def process():
	string = input().strip()
	print(string[0], end='')
	for (i, c) in enumerate(string[1:-1]):
		if i % 2 == 0:
			print(string[i + 1], end='')
	print(string[-1])
n = int(input())
for _ in range(n):
	process()


n = int(input())
for strings in range(n):
	s = input()
	l = len(s)
	x = 1
	y = -1
	ans = ''
	while x < l:
		ans += s[x - 1] + s[x]
		y = x
		x += 4
	if y != l - 1:
		ans += s[l - 1]
	print(ans)


import sys
input = sys.stdin.readline
import math
from collections import defaultdict

def solve():
	n = list(input())
	ans = n[0]
	i = 1
	for i in range(1, len(n) - 1, 2):
		ans += n[i]
	ans += n[-1]
	print(ans)
for _ in range(int(input())):
	solve()


for t in range(int(input())):
	sub = input()
	string = ''
	string += sub[0]
	for i in range(int(len(sub) / 2)):
		string += sub[i * 2 + 1]
	print(string)


t = int(input())
for _ in range(t):
	b = input()
	n = len(b)
	print(b[0], end='')
	for i in range(1, n - 1, 2):
		print(b[i], end='')
	print(b[n - 1])


n = int(input())
for i in range(n):
	a = input()
	l = list(a)
	for i in range(len(l)):
		if i % 2 == 0:
			(print(l[i], end=''),)
	(print(l[len(l) - 1]),)


t = int(input())
while t != 0:
	s = str(input())
	res = s[0]
	i = 2
	while i < len(s):
		res += s[i]
		i += 2
	res += s[-1]
	print(res)
	t -= 1


from sys import stdout, stdin
input = stdin.readline
for t in range(int(input())):
	b = input().strip()
	n = len(b)
	a = b[0]
	for i in range(1, n, 2):
		a += b[i]
	stdout.write(a + '\n')


import sys, collections, math

def in_out():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for _ in range(int(input())):
	s = input()
	item = set()
	first = s[0]
	last = s[-1]
	st = first
	for i in range(1, len(s) - 2, 2):
		st += s[i]
	st += last
	print(st)


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


n = int(input())
for N in range(n):
	s = input()
	ans = ''
	for i in range(len(s)):
		if i == len(s) - 1:
			ans += s[i]
			break
		if i % 2 == 0:
			ans += s[i]
	print(ans)


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


for _ in range(int(input())):
	s = str(input())
	ans = ''
	ans += s[:2]
	ans += s[3::2]
	print(ans)


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


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


for i in range(int(input())):
	s = input()
	ans = [s[0]]
	for i in range(1, len(s) - 1, 2):
		ans.append(s[i])
	ans.append(s[len(s) - 1])
	print(*ans, sep='')


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


a = int(input())
for i in range(a):
	x = input()
	y = len(x)
	z = x[0] + x[1]
	for j in range(3, y, 2):
		z = z + x[j]
	print(z)


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


n = int(input())
i = 0
while i < n:
	a = input()
	c = ''
	c = c + a[0]
	for x in range(1, len(a) - 1):
		if x % 2 == 0:
			c = c + a[x]
	c = c + a[len(a) - 1]
	print(c)
	i = i + 1


for i in range(int(input())):
	l = list(input())
	b = [l[0]]
	for j in range(1, len(l), 2):
		b.append(l[j])
	print(''.join(b))


koyda = int(input())
listo1 = []
listo = []
for i in range(koyda):
	listo.append(input())
for i in listo:
	p = list(i)
	for i in range(0, len(p) + 1, 2):
		try:
			if i == len(p):
				listo1.append(p[i - 1])
				break
			else:
				listo1.append(p[i])
		except IndexError:
			continue
	print(''.join(listo1))
	p = []
	listo1 = []


nb = int(input())
for loop in range(nb):
	liste = [str(x) for x in input()]
	n = 2
	for loop in range(2, len(liste), 2):
		if liste[loop] == liste[loop - 1]:
			(liste.pop(loop), liste.insert(loop, '0'))
	for i in range(len(liste)):
		if liste[i] != '0':
			print(liste[i], end='')
	print()


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


n = int(input())
for i in range(n):
	b = input()
	c = b[0]
	for p in range(1, len(b) - 1, 2):
		if b[p] == b[p + 1]:
			c += b[p]
	print(c + b[-1])


t = int(input())
output = []
for i in range(t):
	string = input()
	result = ''
	podstrs = []
	for k in range(0, len(string), 2):
		podstrs.append(string[k:k + 2])
	for k in range(len(podstrs)):
		if k != 0:
			result += podstrs[k][1]
		else:
			result += podstrs[k]
	output.append(result)
for i in range(len(output)):
	print(output[i])


a = int(input())
for i in range(a):
	my_string = input()
	new_string = ''
	for j in range(len(my_string)):
		if j == 0 or j == len(my_string) - 1 or j % 2 == 0:
			new_string += my_string[j]
	print(new_string)


n = int(input())
list1 = []
list2 = []
for i in range(n):
	word = list(input())
	list1.append(word)
for i in list1:
	list2.append(i[0])
	count = 1
	for j in i:
		if count % 2 == 0:
			list2.append(j)
		count = count + 1
	x = ''.join(list2)
	print(x)
	list2.clear()
	x = ''


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


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

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

def solve(arr):
	start = arr[0] + arr[1]
	for _i in range(3, len(arr), 2):
		start += arr[_i]
	return start
t = inp()
for i in range(t):
	print(solve(insr()))


n = int(input())
for i in range(n):
	word = input()
	if len(word) == 2:
		print(word)
	else:
		wr_ls = []
		mid = []
		for j in word:
			wr_ls.append(j)
		for k in range(2, len(wr_ls) - 1):
			if k % 2 != 0:
				mid.append(wr_ls[k])
		w = ''.join(mid)
		print(word[:2] + w + wr_ls[len(wr_ls) - 1])


q = int(input())
for z in range(q):
	s = input()
	s1 = ''
	i = 0
	n = len(s)
	while i < n - 2:
		s1 += s[i]
		i += 2
	s2 = s[n - 2] + s[n - 1]
	s1 += s2
	print(s1)


t = int(input())
for i in range(t):
	s = input()
	l = []
	i = 0
	while i + 2 <= len(s):
		temp = s[i:i + 2]
		l.append(temp)
		i += 2
	new_s = l[0]
	for i in range(1, len(l)):
		temp = l[i]
		new_s += temp[1:]
	print(new_s)


n = int(input())
for i in range(n):
	m = input()
	index = 0
	a = []
	while index < len(m) - 1:
		if m[index] != m[index + 1]:
			a.append(m[index])
			index = index + 1
		else:
			a.append(m[index])
			index = index + 2
	a.append(m[-1])
	dil = ''
	print(dil.join(a))


t = int(input())
for i in range(t):
	string = input()
	i = 3
	s = []
	result = string[0] + string[1]
	while i <= len(string):
		s.append(string[i])
		i += 2
	for j in range(len(s)):
		result += s[j]
	print(result)


t = int(input())
for _ in range(t):
	s = input()
	result = []
	index = 0
	while index < len(s):
		result.append(s[index])
		index += 2
	result.append(s[-1])
	print(''.join(result))


for _ in range(int(input())):
	S = input()
	(t, ans) = ('', '')
	for i in range(len(S))[::2]:
		t = S[i:i + 2]
		if ans == '':
			ans += t
		elif ans[-1] == t[0]:
			ans += t[1]
		else:
			ans += t
	print(ans)


n = int(input())
for i in range(n):
	a = input()
	result = ''
	for (idx, i) in enumerate(a):
		if idx % 2 == 0 or idx == len(a) - 1:
			result += i
	print(result)


n = int(input())
for k in range(n):
	s = input()
	print(s[0], s[1::2], sep='')


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


n = int(input())
arop = []
for i in range(n):
	inp = input()
	if len(inp) == 2:
		arop.append(inp)
	else:
		str1 = str(inp[0])
		for j in range(1, len(inp)):
			if j % 2 != 0:
				str1 += inp[j]
			else:
				continue
		arop.append(str1)
for l in arop:
	print(l)


t = int(input())
for case in range(t):
	s = input()
	n = len(s)
	res = ''
	for index in range(0, n):
		if index % 2 == 0 or index == n - 1:
			res += s[index]
	print(res)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def inin():
	return int(input())

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

def ar(element, size):
	return [element for i in range(size)]

def yes():
	print('Yes')

def no():
	print('No')
Testcase = inin()
for _ in range(Testcase):
	s = input()
	n = len(s)
	a = s[0]
	for i in range(1, n, 2):
		a += s[i]
	print(a)


x = eval(input())
for i in range(0, x):
	a = str(input())
	a = list(a)
	b = int(len(a))
	for i in range(0, b, 2):
		print(a[i], end='')
		i += 1
	print(a[-1])


testcases = int(input())
for i in range(testcases):
	b = input()
	first = b[0:2]
	second = b[3:len(b):2]
	print(first + second)


inta = int(input())
for n in range(inta):
	word = input()
	word2 = list(word)
	word3 = []
	for i in range(len(word2)):
		if i % 2 == 0:
			word3.append(word2[i])
	word3.append(word2[-1])
	word4 = ''
	for i in range(len(word3)):
		word4 = word4 + word3[i]
	print(word4)


import bisect
import collections
import copy
import functools
import heapq
import itertools
import math
import random
import re
import sys
import time
import string
from time import time_ns
from typing import List
sys.setrecursionlimit(99999)

def II():
	return int(sys.stdin.readline().strip())

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

def SI():
	return sys.stdin.readline().strip()
for _ in [0] * II():
	s = input()
	print(s[0] + s[1::2])


t = int(input())

def halfs(s):
	ans = ''
	for ss in range(len(s)):
		if ss % 2 == 0:
			ans = ans + s[ss]
	return ans
for i in range(t):
	s = input()
	ans = s[0] + halfs(s[1:-1]) + s[-1]
	print(ans)


for _ in range(int(input())):
	b = list(input())
	a = [b[0]]
	i = 1
	while i < len(b):
		a.append(b[i])
		i += 2
	else:
		if len(b) % 2:
			a.append(b[i])
	if len(b) == 2:
		print(''.join(b))
	else:
		print(''.join(a))


t = int(input())
for _ in range(t):
	string = input().strip()
	answer = string[:2]
	if len(string) <= 2:
		answer = string
	else:
		for i in range(3, len(string), 2):
			answer += string[i]
	print(answer)


T = int(input())
while T > 0:
	B = input()
	A = ''
	for i in range(0, len(B), 2):
		A += B[i]
	print(A + B[len(B) - 1])
	T -= 1


for line in range(int(input())):
	b = input()
	a = ''
	for (j, i) in enumerate(b):
		if j % 2 == 1:
			a += i
	print(b[0] + a)


t = input()
t = int(t)
for i in range(t):
	b = input()
	s = ''
	s = b[0]
	j = 1
	while j < len(b):
		s = s + b[j]
		j = j + 2
	print(s)


CaseNo = int(input())
for x in range(CaseNo):
	StringB = input()
	StringA = ''
	for y in range(len(StringB)):
		if y % 2 == 0:
			value = StringB[y]
			StringA += value
		elif y == len(StringB) - 1:
			value = StringB[len(StringB) - 1]
			StringA += value
	print(StringA)


def get_original_string(s):
	p = s[0]
	for i in range(1, len(s) - 1):
		if i % 2 == 0:
			p = p + s[i]
	p = p + s[-1]
	return p
t = int(input())
for i in range(1, t + 1):
	s = input()
	print(get_original_string(s))


import sys
import math
from collections import *

def get_ints():
	return map(int, input().split())

def get_list():
	return list(get_ints())

def printspx(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
MODPRIME = int(1000000000.0 + 7)
BABYMODPR = 998244353
MAXN = int(100000.0)
for _testcases_ in range(int(input())):
	s = input()
	i = 0
	ans = ''
	while i < len(s):
		ans += s[i]
		i += 2
	print(ans + s[-1])


tc = int(input())
for ctr in range(tc):
	a = input().strip()
	for i in range(len(a)):
		if i % 2 == 0:
			print(a[i], end='')
	print(a[-1])


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(n,) = I()
for i in range(n):
	s = input().strip()
	k = len(s)
	an = s[0]
	for j in range(1, k - 1, 2):
		an = an + s[j]
	an += s[-1]
	print(an)


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


t = int(input())
for i in range(0, t):
	newstring = input()
	a = ''
	c = 0
	for k in range(0, len(newstring) + 2, 2):
		if c % 2 == 0:
			if k == len(newstring):
				a = a + newstring[k - 1:]
			else:
				a = a + newstring[k:k + 2]
		c += 1
	print(a)


k = input()
k = int(k)
for i in range(k):
	str = input()
	res = str[:2]
	for j in range(3, len(str), 2):
		res = res + str[j]
	print(res)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	s = input().strip('\n')
	ans = []
	for i in range(len(s)):
		if i % 2 == 0:
			ans.append(s[i])
	ans.append(s[-1])
	print(''.join(ans))


test = int(input())
for i in range(test):
	palavra = input()
	substrings = []
	for i in range(0, len(palavra), 2):
		substrings.append(palavra[i:i + 2])
	R = str(substrings[0])
	for i in range(1, len(substrings)):
		if substrings[i][0] != substrings[i - 1][1]:
			R += substrings[i]
		else:
			R += substrings[i][1]
	print(R)


n = int(input())
for _ in range(n):
	s = list(input())
	print(s[0], end='')
	if len(s) > 2:
		for i in range(1, len(s) - 2):
			if i % 2 != 0 and s[i] == s[i + 1]:
				print(s[i], end='')
	print(s[-1])


import sys
input = lambda : sys.stdin.readline().rstrip()
inp = sys.stdin.buffer.readline

def I():
	return list(map(int, inp().split()))
for _ in range(int(input())):
	s = input()
	ans = s[0] + s[1]
	for i in range(3, len(s), 2):
		ans += s[i]
	print(ans)


t = int(input())
for i in range(t):
	s = input()
	print(s[0], end='')
	j = 1
	while j < len(s):
		y = s[j]
		j = j + 2
		print(y, end='')
	print('')


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


a = int(input())
output = ''
for x in range(a):
	word = input()
	first = word[0]
	last = word[-1]
	output += first
	for y in range(2, len(word), 2):
		if word[y - 1] == word[y]:
			output += word[y]
	output += last
	print(output)
	output = ''


import time, math, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

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

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

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def readTree():
	v = int(input())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count

def solve():
	s = input()
	if len(s) == 2:
		print(s)
	else:
		n = s[0]
		for i in range(1, len(s), 2):
			n += s[i]
		print(n)
t = II()
for i in range(t):
	solve()


x = input()
for i in range(int(x)):
	string = input()
	ans = string[0] + string[1]
	for j in range(2, len(string)):
		if j % 2 != 0:
			ans = ans + string[j]
	print(ans)


t = int(input())
for k in range(t):
	s = [i for i in input().split()]
	start = s[0][:2]
	last = s[0][-1]
	if len(s[0]) <= 2:
		print(''.join(s))
	else:
		j = 3
		ss = ''
		while j <= len(s[0]):
			ss += s[0][j]
			j += 2
		print(start + ss)


def fun(arr):
	if len(arr) == 1:
		return arr
	temp = []
	temp.append(arr[0])
	temp.append(arr[1])
	for i in range(2, len(arr)):
		if i % 2 != 0:
			temp.append(arr[i])
	return ''.join(temp)
for i in range(0, int(input())):
	val = input()
	print(fun(val))


t = int(input())
for _ in range(t):
	b = input()
	str = ''
	for x in range(0, len(b), 2):
		str = str + b[x]
		if x == len(b) - 2:
			str = str + b[-1]
			break
	print(str)


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


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
for _ in range(int(input())):
	s = input()
	n = len(s)
	if n <= 2:
		print(s)
	else:
		stri = s[0]
		i = 1
		while i < n - 1:
			stri += s[i]
			i += 2
		stri += s[-1]
		print(stri)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
testcases = int(input())
for j in range(testcases):
	b = input()
	outy = []
	for s in range(0, len(b), 2):
		outy.append(b[s])
	outy.append(b[-1])
	print(''.join(outy))


n = int(input())
while n > 0:
	stri = input()
	x = len(stri)
	count = 3
	tot = None
	if x > count:
		while count <= x:
			if tot is None:
				tot = stri[0:2]
			tot = tot + stri[count]
			count = count + 2
		print(tot)
	else:
		print(stri[0:3])
	n = n - 1


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
from collections import Counter

def main():
	n = inp()
	for i in range(n):
		s = insr()
		print(''.join(s[0:1] + s[1:-1:2] + s[-1:]))
main()


t = int(input())
for i in range(t):
	b = [str(i) for i in input()]
	a = []
	for l in range(len(b)):
		if l < 1:
			a.append(b[l])
		elif l + 1 == len(b):
			a.append(b[l])
		elif l % 2 == 1:
			a.append(b[l])
		else:
			pass
	print(''.join(a))


a = int(input())
for i in range(a):
	k = input()
	t = k[0]
	for j in range(len(k)):
		if j % 2 != 0:
			t += k[j]
	print(t)


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	s = minp()
	print(s[0] + s[1::2])
for i in range(mint()):
	solve()


t = int(input())
ans = []
for _ in range(t):
	res = []
	s = list(input())
	last = s[-1]
	res.append(s[0])
	s = s[1:]
	s = s[:-1]
	for i in s[::2]:
		res.append(i)
	res.append(last)
	ans.append(''.join(res))
print('\n'.join(ans))


t = int(input())
for _ in range(t):
	a = input()
	d = len(a)
	s = ''
	for i in range(d):
		if i == 0:
			s = s + a[i]
		elif i % 2 == 1:
			s = s + a[i]
	print(s)


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


from collections import OrderedDict
testcases = int(input())
for i in range(testcases):
	s = str(input())
	res = str()
	res = s[0:2]
	for i in range(3, len(s), 2):
		res += s[i]
	print(res)


import sys

def get_numbers():
	return map(int, sys.stdin.readline().strip().split())
n = int(input())
for i in range(n):
	string = input()
	result = '' + string[0]
	for i in range(1, len(string), 2):
		result += string[i]
	print(result)


def num():
	return int(input())

def line():
	return map(int, input().split())
from itertools import repeat
t = num()
for _ in repeat(None, t):
	b = input()
	print(b[0] + b[1:-1:2] + b[-1])


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


t = int(input())
while t > 0:
	s = input()
	i = 0
	x = ''
	while i < len(s) - 1:
		if s[i] != s[i + 1]:
			x = x + s[i]
		else:
			x = x + s[i]
			i = i + 1
		i = i + 1
	x = x + s[len(s) - 1]
	print(x)
	t = t - 1


for _ in range(int(input())):
	s = input()
	ans = s[:2]
	ans = ans + ''.join(list(s[2:])[1::2])
	print(ans)


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


t = int(input())
for _ in range(t):
	b = input()
	a = []
	a.append(b[0])
	a.append(b[1])
	for i in range(3, len(b), 2):
		a.append(b[i])
	c = ''
	for x in a:
		c += x
	print(c)


def get_string(a):
	s = ''
	for i in range(0, len(a), 2):
		s += a[i]
	s += a[-1]
	return s
t = int(input())
for _ in range(t):
	s = input()
	res = get_string(s)
	print(res)


t = int(input())
sols = []
for _ in range(t):
	st = list(input().strip())
	sol = []
	for i in range(0, len(st), 2):
		sol.append(st[i])
	sol.append(st[-1])
	sols.append(''.join(sol))
for o in sols:
	print(o)


import sys
caseCount = int(next(sys.stdin))

def solve(b):
	a = b[0]
	n = len(b)
	for i in range(1, n - 1, 2):
		a += b[i]
	a += b[-1]
	return a
for i in range(caseCount):
	text = next(sys.stdin)[:-1]
	ans = solve(text)
	print(solve(text))


t = int(input())
p = 0
while p < t:
	p = p + 1
	b = input()
	n = 2
	a = b
	c = len(b)
	while n < len(b):
		b = a
		if n % 2 == 0:
			a = b[:n] + '.' + b[n + 1:]
		n = n + 1
	a = a.replace('.', '')
	print(a)


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


cases = int(input())
for case in range(cases):
	inp = input()
	if len(inp) <= 2:
		print(inp)
	else:
		temp = []
		temp.append(inp[0])
		for index in range(1, len(inp) - 1, 2):
			temp.append(inp[index])
		temp.append(inp[-1])
		print(''.join(temp))


a = int(input())
for i in range(a):
	b = input()
	i = 0
	c = ''
	while i < len(b) - 2:
		c = c + b[i]
		i = i + 2
	c = c + b[len(b) - 2:]
	print(c)


def solve():
	ans = ''
	st = str(input())
	for i in range(0, len(st), 2):
		ans += st[i]
	print(ans + st[-1])
t = int(input())
for i in range(t):
	solve()


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		string = input()
		n = len(string)
		ans = []
		for i in range(n):
			if i == 0 or i == n - 1:
				ans.append(string[i])
			elif i % 2:
				ans.append(string[i])
		yield ''.join((str(x) for x in ans))
t = int(input())
ans = gift()
print(*ans, sep='\n')


T = int(input())
for i in range(T):
	b = input()
	ans = ''
	ans += b[0]
	j = 1
	while j < len(b):
		ans += b[j]
		j += 2
	if j != len(b) - 1 + 2:
		ans += b[-1]
	print(ans)


import sys
input = sys.stdin.readline

def prog():
	for _ in range(int(input())):
		b = input().strip()
		output = b[0]
		for i in range(1, len(b) - 2, 2):
			output += b[i]
		output += b[-1]
		sys.stdout.write(output + '\n')
prog()


def solve():
	b = input()
	a = ''
	n = len(b)
	for i in range(0, n - 1, 2):
		x = b[i:i + 2]
		if i == n - 2:
			a += x
		else:
			a += x[0]
	print(a)
t = int(input())
for i in range(1, t + 1):
	solve()


t = int(input())
c = []
for i in range(t):
	b = input()
	c.append(b)
for i in range(t):
	if len(c[i]) == 2:
		print(c[i])
	else:
		d = []
		e = str()
		for j in range(len(c[i])):
			if j % 2 == 0:
				d.append(c[i][j])
			else:
				continue
		d.append(c[i][-1])
		for k in range(len(d)):
			e = e + d[k]
		print(e)


t = int(input())
for case in range(t):
	b = input()
	length = len(b)
	a = ''
	for i in range(length):
		if i == 0 or i == length - 1:
			a = a + str(b[i])
		elif i % 2 == 1:
			a = a + str(b[i])
	print(a)


t = int(input())
for x in range(t):
	a = input()
	b = list()
	for x in range(0, len(a) - 1, 2):
		b.append(a[x:x + 2])
	c = b[0]
	b.pop(0)
	for x in b:
		c += x[1]
	print(c)


def decode_string(input):
	enc_len = 2
	retlist = ''
	for i in range(0, int(len(input)), 2):
		if i == 0:
			retlist = input[i:i + 2]
		else:
			retlist += input[i:i + 2][-1]
	return retlist
numlines = input()
outlist = []
for i in range(int(numlines)):
	outlist.append(decode_string(str(input())))
for i in range(len(outlist)):
	print(outlist[i])


for _ in range(int(input())):
	s = input()
	if len(s) == 2:
		print(s)
	else:
		chk = s[1:len(s) - 1]
		li = []
		for i in range(0, len(s), 2):
			j = chk[i:i + 2]
			li.append(j)
		while '' in li:
			li.remove('')
		final = []
		for i in li:
			final.append(i[0])
		stri = ''
		for i in final:
			stri += i
		print(s[0] + stri + s[-1])


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

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

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
t = iinput()
for _ in range(t):
	A = input()
	str = A[:2]
	i = 0
	for a in A[2:]:
		if i % 2 != 0:
			str = str + a
		i += 1
	print(str)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	s = input()
	if len(s) == 2:
		print(s)
	else:
		ans = s[0]
		for i in range(1, len(s), 2):
			ans += s[i]
		print(ans)


t = int(input())
while t > 0:
	t -= 1
	st = input()
	out = st[0] + st[1:-1:2] + st[-1]
	print(out)


import sys
q = int(sys.stdin.readline())
for _ in range(q):
	a = list(sys.stdin.readline().strip())
	res = ''
	for i in range(len(a)):
		if i < 2:
			res += a[i]
		elif i % 2 != 0:
			res += a[i]
	print(res)


a = int(input())
for i in range(a):
	b = input()
	d = []
	for j in range(len(b)):
		if j % 2 == 0:
			d.append(b[j])
	if len(b) % 2 == 0:
		d.append(b[-1])
	for i in d:
		print(i, end='')
	print()


try:

	def form(a):
		b = []
		b.append(a[0])
		for i in range(1, len(a) - 1, 2):
			b.append(a[i])
		b.append(a[len(a) - 1])
		final = ''.join(b)
		return final
	t = int(input())
	for _ in range(t):
		a = input()
		print(form(a))
except:
	pass


for _ in range(int(input())):
	s = input()
	c = ''
	i = 0
	n = len(s)
	while i < n:
		c = c + s[i]
		i = i + 2
	print(c + s[n - 1])


for _ in range(int(input())):
	ans = []
	b = input()
	ans.append(b[:2])
	for i in range(3, len(b), 2):
		ans.append(b[i])
	print(''.join(ans))


n = int(input())
for i in range(n):
	m = input()
	l = len(m)
	if l <= 2:
		print(m)
	else:
		print(m[0], end='')
		for j in range(1, l - 1, 2):
			print(m[j], end='')
		print(m[l - 1])


list_of_string = []
output = []
for i in range(int(input())):
	string = input()
	list_of_string[:] = string
	if list_of_string.count(list_of_string[0]) == len(list_of_string):
		del list_of_string[:len(list_of_string) // 2 - 1]
		c = ''.join(list_of_string)
		output.append(c)
	else:
		for j in range(len(list_of_string) // 2):
			if list_of_string[j] == list_of_string[j + 1]:
				list_of_string.pop(j)
		c = ''.join(list_of_string)
		output.append(c)
print(*output, sep='\n')


n = int(input())
for i in range(n):
	a = input()
	if len(a) <= 2:
		print(a)
	elif len(a) == 3:
		print(a[0], end='')
		print(a[2])
	else:
		print(a[0], end='')
		print(a[1], end='')
		for x in range(3, len(a), 2):
			print(a[x], end='')
		print('')


n = int(input())
for i in range(n):
	s = input()
	a = ''
	for k in range(2):
		a = a + s[k]
	k = 3
	for j in range(k, len(s), 2):
		a = a + s[j]
	print(a)


def dhana(a):
	t = a[:2]
	y = a[2:]
	x = len(y)
	if len(a) == 2:
		return a
	else:
		for i in range(x):
			if i % 2 != 0:
				t += a[2 + i]
	return t
n = int(input())
for i in range(n):
	a = input()
	x = dhana(a)
	print(x)


t = int(input())
for _ in range(t):
	s = input()
	i = 0
	while i < len(s):
		if i > 0 and i < len(s) - 1:
			print(s[i], end='')
			i += 1
		else:
			print(s[i], end='')
		i += 1
	print('')


number = int(input())
for _ in range(number):
	user = input()
	duplicate = user[0]
	j = (len(user) - 2) // 2
	for x in range(j):
		duplicate += user[2 * x + 1]
	duplicate += user[len(user) - 1]
	print(duplicate)


num_tests = int(input())

def get_orig(s):
	count = 0
	out = ''
	for i in s:
		if count % 2 == 0 or count == len(s) - 1:
			out += i
		count += 1
	return out
for test in range(num_tests):
	print(get_orig(input()))


t = int(input())
while t:
	t -= 1
	s = input()
	s1 = s[2:len(s)]
	s2 = ''
	s3 = ''
	for i in range(0, len(s1), 2):
		s2 += s1[i]
	s3 = s[0] + s2 + s[len(s) - 1]
	print(s3)


import sys
import math
from os import path
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for i in range(int(input())):
	b = input()
	a = ''
	a += b[:2]
	for i in range(2, len(b)):
		if i % 2 != 0:
			a += b[i]
	print(a)


import math
n = int(input())
lst = []
for _ in range(n):
	str1 = input()
	if len(str1) == 2:
		lst.append(str1)
	else:
		str2 = ''.join(str1[0] + str1[1])
		for i in range(3, len(str1), 2):
			str2 += str1[i]
		lst.append(str2)
for val in lst:
	print(val)


print('\n')
n = input()
n = int(n)
for _ in range(n):
	string = input()
	iter_ = len(string) / 2
	output = ''
	for i in range(int(iter_)):
		output += string[i * 2]
		pass
	output += string[-1]
	print(output)
	pass
pass


t = int(input())
while t > 0:
	t -= 1
	b = input()
	b = list(b)
	a = []
	a.append(b[0])
	i = 1
	l = len(b)
	while i < l - 1:
		a.append(b[i])
		i += 2
	a.append(b[l - 1])
	ans = ''
	for i in a:
		ans += str(i)
	print(ans)


def main():
	for i in range(int(input())):
		b = input()
		convert = b[1:-1]
		list1 = []
		for i in range(0, len(convert) - 1, 2):
			list1.append(convert[i])
		print(b[0] + ''.join([i for i in list1]) + b[-1])
main()


n = int(input())
for i in range(n):
	a = input()
	i = 0
	while i != len(a):
		if i % 2 == 0:
			print(a[i], end='')
		i += 1
	print(a[len(a) - 1])


t = int(input())
while t:
	t -= 1
	s = input()
	new = []
	new.append(s[0])
	for i in range(len(s)):
		if i != 0 and i != len(s) - 1:
			if i % 2 == 0:
				new.append(s[i])
	new.append(s[len(s) - 1])
	for i in new:
		print(i, end='')
	print()


testcases = int(input())
for i in range(testcases):
	s = input()
	result = ''.join(s[0:2])
	i = 2
	while i < len(s):
		result += s[i + 1]
		i += 2
	print(result)


t = int(input())
for _ in range(t):
	s = input()
	ans = []
	ans.append(s[0])
	counter = 1
	while counter < len(s):
		ans.append(s[counter])
		counter += 2
	print(''.join(ans))


import sys
import math
import collections
import heapq
import queue
import itertools
import functools
import operator
import time
readline = sys.stdin.readline
IPS = lambda : readline().rstrip()
IP = lambda : int(readline().rstrip())
MP = lambda : map(int, readline().split())
LS = lambda : list(map(int, readline().split()))

def solve():
	for _ in range(IP()):
		st = IPS()
		if len(st) <= 2:
			print(st)
		else:
			(temp, i) = ('', 0)
			while i < len(st):
				temp += st[i]
				i += 2
			temp += st[-1]
			print(temp)
solve()


import math
t = int(input())
for i in range(t):
	s = str(input()).strip('\n')
	org = ''
	for j in range(0, len(s), 2):
		org = org + s[j]
	org = org + s[-1]
	print(org)


how = int(input())
for n in range(how):
	word = str(input())
	wo = ''
	m = 0
	while m < len(word) - 1:
		if word[m] == word[m + 1]:
			m += 1
		wo = wo + word[m]
		m += 1
	if word[len(word) - 1] == word[len(word) - 2]:
		m = m - 1
	wo = wo + word[m]
	print(wo)


t = int(input())
l1 = []
for i in range(t):
	b = input()
	l1.append(b)
for string in l1:
	z = string[0:2]
	for i in range(3, len(string), 2):
		z = z + string[i]
	if len(string) % 2 != 0:
		z = z + string[-1]
	print(z)


import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def get_str():
	return input().decode().strip()

def rint():
	return map(int, input().split())

def oint():
	return int(input())
t = oint()
for _ in range(t):
	ans = []
	b = get_str()
	n = len(b)
	print(b[0] + b[1:n - 1:2] + b[-1])


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


t = int(input())
for i in range(t):
	a = input()
	a = list(a)
	s = ''
	for j in range(len(a)):
		if j == 0 or j == 1:
			s = s + a[j]
		elif j % 2 != 0:
			s = s + a[j]
	print(s)


t = int(input())
for g in range(t):
	new = ''
	l = []
	b = input()
	if len(b) == 2:
		print(b)
	else:
		for i in b:
			l.append(i)
		new += l[0]
		i = 1
		while i < len(l) - 1:
			new += l[i]
			i += 2
		new += l[-1]
		print(new)


def solve(a):
	arr = []
	for i in range(len(a) - 1):
		arr += [a[i:i + 2]]
	rez = arr[0]
	for i in range(1, len(a)):
		if i % 2 == 0:
			rez += arr[i][1]
	print(rez)
for _ in range(int(input())):
	solve(input())


x = int(input())
for xx in range(x):
	b = input()
	s = ''
	a = len(b)
	for _ in range(0, a - 2, 2):
		s += b[_]
	s += b[-2]
	s += b[-1]
	print(s)


answer = []
for i in range(int(input())):
	b = input()
	c = ''
	for j in range(1, len(b) - 1, 2):
		c += b[j]
	a = b[0] + c + b[-1]
	answer.append(a)
for i in range(len(answer)):
	print(answer[i])


def solve():
	b = input()
	n = len(b)
	a = ''
	i = 0
	while i < n - 1:
		a += b[i]
		i += 2
	a += b[-1]
	print(a)
t = int(input())
for _ in range(t):
	solve()


import sys
t = int(input())
while t > 0:
	b = input()
	n = len(b)
	a = str()
	m = (n + 2) // 2
	for i in range(m - 1):
		a += b[2 * i]
	a += b[-1]
	print(a)
	t -= 1


t = int(input())
for _ in range(t):
	n = [char for char in input()]
	s = []
	i = 0
	s.append(n[0])
	for i in range(1, len(n) - 1):
		if i % 2 != 0:
			s.append(n[i])
	s.append(n[-1])
	print(''.join(s))


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


for u in range(int(input())):
	x = input()
	if len(x) == 2:
		print(x)
	else:
		ans = ''
		for i in range(0, len(x), 2):
			ans += x[i]
		print(ans + x[-1])


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


n = int(input())
for _ in range(n):
	s = input()
	print(f'{s[0]}{s[1:-1:2]}{s[-1]}')


n = int(input())
words = []
for i in range(n):
	words.append(input())
for word in words:
	start = word[0]
	end = word[len(word) - int(1)]
	checkWord = word[int(1):len(word) - int(2)]
	result = start + checkWord[::2] + end
	print(result)


T = int(input())
ans = []
for t in range(T):
	b = input()
	s = [b[0]]
	ind = 1
	while ind < len(b) - 1:
		s.append(b[ind])
		ind += 2
	s.append(b[-1])
	ans.append(''.join(s))
print(*ans, sep='\n')


B = int(input())
for i in range(B):
	word = input()
	f = word[:1]
	m = word[1:len(word) - 1:2]
	e = word[-1]
	print(f + m + e)


n = int(input(''))
outputs = []
for i in range(n):
	s = input('')
	out = s[0]
	for j in range(1, len(s) - 1):
		if j % 2 == 0:
			out += s[j]
	out += s[len(s) - 1]
	outputs.append(out)
for i in range(n):
	print(outputs[i])


t = int(input())
for x in range(t):
	s = input()
	out = s[0:2]
	n = len(s)
	i = 1
	if n > 2:
		for i in range(3, n, 2):
			out += s[i]
		if i != n - 1:
			out += s[n - 1]
	print(out)


try:

	def returnsA(s, n):
		a = []
		for i in range(n):
			if i % 2 == 0 and i != n - 1:
				a.append(s[i])
			elif i == n - 1:
				a.append(s[i])
		return ''.join(a)
	if __name__ == '__main__':
		test = int(input())
		for _ in range(test):
			s = input()
			print(returnsA(s, len(s)))
except:
	pass


t = int(input())
for _ in range(t):
	b = input()
	ans = ''
	for i in range(0, len(b), 2):
		if ans == '':
			ans += b[i:i + 2]
		else:
			ans = ans[:-1] + b[i:i + 2]
	print(ans)


n = int(input())
for i in range(n):
	str = input()
	j = 0
	k = ''
	while j < len(str):
		k += str[j]
		j += 2
	k += str[-1]
	print(k)


def solve(d):
	big = float('inf')
	small = float('-inf')
	n = len(d)
	res = d[0]
	for i in range(1, n):
		if i % 2 != 0:
			res += d[i]
	return res

def main():
	t = int(input())
	for i in range(t):
		d = input()
		d = [i for i in d]
		ans = solve(d)
		print(ans)
main()


a = int(input())
for i in range(0, a):
	a = input()
	ans = [a[0]]
	for i in range(1, len(a), 2):
		ans.append(a[i])
	print(''.join(ans))


def bob():
	for i in range(int(input())):
		w = input()
		st = ''
		for j in range(0, len(w), 2):
			st += w[j]
		if len(w) % 2 == 0:
			print(st + w[-1])
		else:
			print(st)
bob()


t = int(input())
for i in range(t):
	s = input()
	i = 0
	j = 1
	c = 0
	while i <= len(s) and j <= len(s):
		print(s[i:j + 1], end='')
		i = i + 4
		j = j + 4
	if len(s) // 2 % 2 == 0:
		print(s[-1])
	else:
		print('')


n = int(input())
for i in range(n):
	t = input()
	i = 0
	s = ''
	f = 0
	for i in range(len(t) - 1):
		if f == 1:
			f = 0
			continue
		if i == len(t) - 1:
			s += t[i]
			continue
		if t[i] == t[i + 1]:
			s += t[i]
			f = 1
		else:
			s += t[i]
			f = 0
	s += t[-1]
	print(s)


for _ in range(int(input())):
	b = input()
	if len(b) < 4:
		print(b)
		continue
	i = 3
	res = b[:2]
	while i < len(b):
		res += b[i]
		i += 2
	print(res)


t = int(input())
for i in range(t):
	b = input()
	c = b[0:2]
	d = b[3:len(b):2]
	print(c + d)


for _ in range(int(input())):
	st = input()
	arr = []
	arr2 = []
	n = len(st)
	for i in range(n):
		arr.append(st[i])
	for i in range(n):
		if i % 2 == 0:
			arr2.append(arr[i])
	newest = ''
	for i in arr2:
		newest += i
	if n == 2:
		print(st)
	elif n % 2 == 0:
		print(newest + st[-1])
	else:
		print(newest)


for _ in range(int(input())):
	s = input()
	l = len(s)
	print(s[:2], end='')
	for i in range(3, l, 2):
		print(s[i], end='')
	print()


t = int(input())
for j in range(0, t):
	s = input()
	k = 0
	ns = ' '
	prev = ' '
	i = 0
	while i < len(s):
		ns += s[i:i + 1]
		i = i + 2
	ns += s[i - 1]
	print(ns)


def dsc(s):
	return s[0] + s[1:-2:2] + s[-1]

def vdsc(v):
	for x in v:
		yield dsc(x)
n = int(input())
v = [input() for x in range(n)]
for x in vdsc(v):
	print(x)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
sys.setrecursionlimit(int(pow(10, 6)))
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(l()[0]):
	s = input()
	ans = s[0]
	for i in range(1, len(s) - 1):
		if i % 2:
			ans += s[i]
	ans += s[-1]
	print(ans)


n = int(input())
for i in range(0, n):
	s = input()
	nn = len(s)
	ss = ''
	if nn == 2:
		ss = s
	else:
		ss = ss + s[0]
		sss = s[1:nn:2]
		ss = ss + sss
	print(ss)


def foo(s):
	t = ''
	for i in range(len(s) // 2):
		t += s[2 * i]
	return t
q = int(input())
for _ in range(q):
	s = input()
	print(s[0] + foo(s[2:len(s)]) + s[len(s) - 1])


def stri(k):
	return k[::2] + k[-1]
for t in range(int(input())):
	common = input()
	print(stri(common))


def solve():
	b = list(input())
	a = [b[0]]
	for i in range(1, len(b) - 1, 2):
		if b[i] != b[i + 1]:
			raise 'bad luck'
		a.append(b[i])
	a.append(b[-1])
	return ''.join(a)
for _ in range(int(input())):
	print(solve())


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

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

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline().rstrip()

def lsi():
	return list(si())
res = ['Yes', 'No']
test_case = ii()
while test_case:
	test_case -= 1
	a = lsi()
	b = [a[0]]
	for i in range(1, len(a), 2):
		b.append(a[i])
	print(*b, sep='')


for I in range(int(input())):
	s = input()
	l = len(s)
	result = s[:2]
	for i in range(3, l, 2):
		result += s[i]
	print(result)


def solve(s):
	r = ''
	i = 0
	while i < len(s):
		r = r + s[i]
		i += 2
	r += s[-1]
	return r
for _ in range(int(input())):
	s = input()
	print(solve(s))


def solve(s):
	final = s[0:2]
	for i in range(3, len(s), 2):
		final += s[i]
	return final
t = int(input())
for i in range(t):
	s = input()
	print(solve(s))


from sys import stdin, stdout
import math

def solve():
	s = input()
	if len(s) == 2:
		print(s)
		return
	ans = ''
	for i in range(len(s)):
		if (i + 1) % 2:
			ans += s[i]
	if len(s) % 2 == 0:
		ans += s[-1]
	print(ans)
test = 1
test = int(input())
for __ in range(test):
	solve()


n = int(input())
for i in range(n):
	a = input()
	result = []
	for i in range(0, len(a), 2):
		result.append(a[i:i + 2])
	answer = result[0]
	result.pop(0)
	for item in result:
		answer += item[1]
	print(answer)


for i in range(int(input())):
	b = input()
	a = ''
	i = 0
	if len(b) > 2:
		while i < len(b) - 1:
			a += b[i]
			i += 2
		print(a + b[-1])
	else:
		print(b)


def mi():
	return map(int, input().split())
for _ in range(int(input())):
	a = list(input())
	out = [a[0]]
	for i in range(1, len(a), 2):
		out.append(a[i])
	print(''.join(out))


t = int(input())
for i in range(t):
	a = ''
	b = input()
	lb = len(b)
	if lb == 2:
		print(b)
	else:
		ch1 = b[0]
		ch2 = b[lb - 1]
		for j in range(1, lb - 1):
			if j % 2 != 0:
				a = a + b[j]
		a = ch1 + a + ch2
		print(a)


t = int(input())
for tt in range(t):
	s = input()
	a = []
	for x in s:
		a.append(x)
	i = 1
	b = []
	b.append(a[0])
	while i < len(a):
		b.append(a[i])
		i += 2
	for i in range(len(b)):
		print(b[i], end='')
	print()


n = int(input())
for i in range(n):
	ch = input()
	ans = ch[0]
	ch2 = ch[1:len(ch) - 1]
	for i in range(len(ch2)):
		if i % 2 == 0:
			ans = ans + ch2[i]
	ans = ans + ch[len(ch) - 1]
	print(ans)


a = int(input())
for i in range(a):
	m = ''
	b = input()
	j = 1
	m = m + b[0]
	while j < len(b):
		m = m + b[j]
		j += 2
	print(m)


t = int(input())
for i in range(t):
	b = str(input())
	if len(b) % 2 == 1:
		for j in range(0, len(b), 2):
			print(b[j], end='')
	else:
		for j in range(0, len(b), 2):
			print(b[j], end='')
		print(b[len(b) - 1], end='')
	print()


testinp = int(input())
for i in range(1, testinp + 1):
	les = input()
	for j in range(0, len(les), 2):
		print(les[j], end='')
	if len(les) % 2 == 0:
		print(les[len(les) - 1])
	else:
		print()


n = int(input())
for i in range(n):
	b = input()
	if len(b) == 2:
		print(b)
		continue
	a = b[0]
	for i in range(1, len(b) - 1, 2):
		a += b[i]
	a += b[-1]
	print(a)


n = int(input())
a = 0
ch = 0
g = 0
list1 = []
for i in range(n):
	s = input()
	list1.append(s)
	for i in list1:
		i = i[0:len(i) + 1:2]
	print(f'{i}{s[-1]}')


def check(b):
	res = ''
	res += b[0]
	res += b[1]
	i = 2
	while i < len(b):
		if i % 2 == 0:
			i += 1
		else:
			res += b[i]
			i += 1
	return res
t = int(input())
while t > 0:
	b = input()
	if len(b) <= 2:
		print(b)
	else:
		res = check(b)
		print(res)
	t -= 1


rep = int(input())
for i in range(rep):
	st = input()
	ans = st[0]
	for j in range(int(len(st) / 2)):
		ans = ans + st[j * 2 + 1]
	print(ans)


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


for _ in range(int(input())):
	word = input()
	n = len(word)
	output = word[0]
	x = 1
	while x <= n:
		output = output + word[x]
		x += 2
	print(output)


t = int(input())
for q in range(t):
	s = input().strip()
	x = s[0]
	p = (len(s) - 2) / 2
	i = 0
	while i < p:
		x = x + s[1 + 2 * i]
		i += 1
	x = x + s[-1]
	print(x)


for _a in range(int(input())):
	b = str(input())
	if len(b) <= 3:
		print(b)
	else:
		first = b[0]
		last = b[-1]
		ini = b[1:len(b) - 1]
		temp = ''
		for i in range(0, len(ini), 2):
			temp += ini[i]
		print(first + temp + last)


for _ in range(int(input())):
	s = list(input())
	r = str(s[0])
	for i in range(1, len(s) - 1, 2):
		r += s[i]
	r += s[-1]
	print(r)


T = int(input())
for i in range(T):
	s = input()
	out = ''
	i = 0
	while i < len(s):
		out += s[i]
		i += 2
	out += s[len(s) - 1]
	print(out)


n = int(input())
l = []
for x in range(n):
	k = input()
	for y in range(0, len(k), 2):
		l.append(k[y])
	l.append(k[len(k) - 1])
	l = ''.join(l)
	print(l)
	l = []


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


test = int(input())
while test != 0:
	test -= 1
	s = input()
	ans = s[:2]
	ind = 3
	while ind < len(s):
		ans = ans + s[ind]
		ind += 2
	print(ans)


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


n = int(input())
for veces in range(n):
	vec = []
	vec = input()
	rta = ''
	for i in range(0, len(vec), 2):
		rta = rta + vec[i]
	rta = rta + vec[len(vec) - 1]
	print(rta)


tests = int(input())
for _ in range(tests):
	result = 0
	s = input()
	if len(s) != 2:
		for i in range(1, len(s) - 1):
			result = s[0::2]
		print(result + s[-1])
	else:
		print(s)


for _ in range(int(input())):
	l = []
	x = ''
	s = input()
	for i in range(1, len(s), 2):
		l.append(s[i])
	for i in l:
		x += i
	x = s[0] + x
	print(x)


T = int(input())
while T > 0:
	a = input()
	ans = ''
	c = a[1:-2]
	c = c[::2]
	ans = a[0] + c + a[-1]
	print(ans)
	T -= 1


def codeforces(s):
	a = []
	for i in range(0, len(s), 2):
		a.append(s[i])
	a.append(s[-1])
	res = ''.join(a)
	return res
n = int(input())
for i in range(n):
	s = input()
	print(codeforces(s))


for _ in range(int(input())):
	b = input()
	a = list(b[:2])
	for i in range(3, len(b), 2):
		a.append(b[i])
	print(''.join(a))


import math

def solve():
	s = input()
	n = len(s)
	a = ''
	for i in range(0, n):
		if i == 0 or i & 1 == 1:
			a += s[i]
	print(a)
t = 1
t = int(input())
for _ in range(0, t):
	solve()


import sys
import math
from collections import defaultdict as dft
input = sys.stdin.readline

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

def mp():
	return map(int, input().split())

def debug(name, val):
	print(name, ':', val)

def solve():
	s = input()
	res = s[:2]
	for i in range(3, len(s), 2):
		res += s[i]
	print(res)
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for z in range(t):
	b = input()
	print(b[0], end='')
	print(b[1:len(b) - 1:2], end='')
	if len(b) % 2 == 0:
		print(b[len(b) - 1], end='')
	print('')


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


def main():
	n = int(input())
	for _ in range(n):
		s = input()
		res = ''
		for i in range(0, len(s) - 1, 2):
			res += s[i]
		res += s[-1]
		print(res)
main()


x = int(input())
for i in range(x):
	word = input()
	ans = ''
	for i in range(0, len(word), 2):
		ans = ans + word[i]
	print(ans + word[-1])


for i in range(int(input())):
	n = input()
	if len(n) == 2:
		print(n)
	else:
		m = n[1:-1]
		List = n[0]
		if len(m) % 2 == 0:
			for j in range(0, len(m), 2):
				List += m[j]
			List += n[-1]
		print(List)


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


s = int(input())
count = 0
ans = []
while count < s:
	b = input()
	if len(b) >= 4:
		st = b[0:2]
		add = b[3::2]
		st += add
	else:
		st = b
	ans.append(st)
	count += 1
for x in ans:
	print(x)


T = int(input())
while T > 0:
	arr = input()
	res = []
	res.append(arr[0])
	res.append(arr[1])
	for i in range(3, len(arr), 2):
		res.append(arr[i])
	print(''.join(res))
	T -= 1


for t in range(int(input())):
	s = input()
	if len(s) == 2:
		print(s)
	elif len(s) > 2:
		c = ''
		for i in range(0, len(s), 2):
			c = c + s[i]
		c = c + s[-1]
		print(c)


a = int(input())
for i in range(a):
	b = str(input())
	if len(b) > 2:
		s = b[:2]
		for j in range(3, len(b), 2):
			s += b[j]
	else:
		s = b
	print(s)


n = int(input())
while n:
	st = input()
	k = len(st)
	ans = ''
	mid = st[1:k - 1]
	i = 0
	while i < len(mid):
		ans = ans + mid[i]
		i += 2
	ans = st[0] + ans + st[-1]
	print(ans)
	n -= 1


n = int(input())
for i in range(n):
	string = input()
	result = ''
	for i in range(0, len(string), 2):
		result += string[i]
	result += string[-1]
	print(result)


n = int(input())
for i in range(n):
	string = input()
	l = len(string)
	res = ''
	res += string[0]
	j = 1
	while j <= l:
		res += string[j]
		j += 2
	print(res)


n = int(input())
l = []
for i in range(n):
	s = input()
	if len(s) > 2:
		b = ''
		b = b + s[0:2]
		for j in range(3, len(s) + 1, 2):
			b = b + s[j]
		l.append(b)
	else:
		l.append(s)
for i in l:
	print(i)


def main():
	t = int(input())
	for case in range(t):
		b = input()
		a = b[:2]
		i = 3
		while i < len(b):
			a += b[i]
			i += 2
		print(a)
main()


for _ in range(int(input())):
	s = str(input())
	if len(s) == 2:
		print(s)
	else:
		s1 = list(s)
		s2 = s1[0]
		for i in range(1, len(s1) - 1, 2):
			s2 += s1[i]
		s2 += s1[len(s1) - 1]
		print(s2)


for _ in range(int(input())):
	b = input()
	if len(b) == 2:
		print(b)
	else:
		s = b[1:-1]
		result = b[0]
		p = len(s)
		for i in range(0, p, 2):
			result += s[i]
		result += b[-1]
		print(result)


t = int(input())
for ayhg in range(t):
	b = input()
	k = len(b)
	fir = b[0]
	sec = b[-1]
	b = b[0:k - 1:2]
	c = b + sec
	print(c)


n = int(input())
for x in range(n):
	s = list(str(input()))
	f = []
	for x in range(1, len(s) + 1):
		if x % 2 != 0:
			f.append(s[x - 1])
	r = ''.join(f)
	print(r + s[-1])


for i in range(int(input())):
	string = input()
	stnew = string[1:len(string) - 1]
	stringform = ''
	for j in range(0, len(stnew), 2):
		stringform += stnew[j]
	print(string[0] + stringform + string[-1])


t = int(input())
for i in range(t):
	ip = input()
	if len(ip) % 2 == 0:
		print(ip[::2] + ip[-1])
	else:
		print(ip[::2])


def taskA():
	n = int(input())
	for i in range(n):
		line = input()
		if len(line) < 3:
			print(line)
		else:
			answer = line[0]
			for i in range(1, len(line) - 1, 2):
				answer += line[i]
			print(answer + line[len(line) - 1])
taskA()


z = int(input())
for i in range(z):
	st = list(input())
	l = []
	l.append(st[0])
	for i in range(1, len(st) - 1, 2):
		l.append(st[i])
	l.append(st[-1])
	for i in range(0, len(l)):
		print(l[i], end='')
	print()


t = int(input())

def strl(s):
	string = ''
	for ele in s:
		string += ele
	return string
for _ in range(t):
	s = list(input())
	if len(s) <= 2:
		print(strl(s))
	else:
		l = []
		l.append(s[0])
		for i in range(1, len(s) - 1, 2):
			l.append(s[i])
		l.append(s[-1])
		print(strl(l))


for _ in range(int(input())):
	s = input()
	l = []
	for i in range(0, len(s), 2):
		l.append(s[i:i + 2])
	ans = l[0]
	for i in range(1, len(l)):
		if ans[-1] == l[i][0]:
			ans = ans + l[i][-1]
	print(ans)


def SmallSubstrig(s):
	l = len(s)
	sub = ''
	sub += s[0]
	for i in range(1, l, 2):
		sub += s[i]
	print(sub)
for _ in range(int(input())):
	s = input()
	SmallSubstrig(s)


def main():
	b = input()
	if len(b) == 2:
		print(b)
	else:
		start = b[0]
		end = b[-1]
		for i in range(1, len(b) - 1):
			if i % 2 != 0:
				if b[i] == b[i + 1]:
					start += b[i]
		print(start + end)
n = int(input())
for _ in range(n):
	main()


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
sys.setrecursionlimit(100000000)
ii = lambda : int(input())
si = lambda : input()
jn = lambda x, l: x.join(map(str, l))
sl = lambda : list(map(str, input().strip()))
mi = lambda : map(int, input().split())
mif = lambda : map(float, input().split())
lii = lambda : list(map(int, input().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
mod = 1000000007
for _ in range(ii()):
	s = si()
	sa = s[0]
	sa += s[1::2]
	print(sa)


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	str_a = sys.stdin.readline().strip()
	result = ['.']
	check = 0
	for (i, word) in enumerate(str_a):
		if i % 2:
			result.append(word)
			continue
		if not result[-1] == word:
			result.append(word)
	print(''.join(result[1:]))


import math
import bisect
import sys
T = int(input())
for t in range(T):
	b = input()
	a = ''
	l = len(b)
	for i in range(0, l, 2):
		a += b[i]
	a += b[-1]
	print(a)


test_cases = int(input())
for _ in range(test_cases):
	b = input()
	n = len(b)
	print(b[0], ''.join([b[i] for i in range(1, n - 2, 2)]), b[n - 1], sep='')


t = int(input())
while t > 0:
	s = input().split('\n')[0]
	s += s[-1]
	print(s[::2])
	t -= 1


t = int(input())
fin_ans = []
for i in range(t):
	str1 = input()
	arr = list(str1)
	arr1 = []
	for i in range(0, len(str1), 2):
		dispo = []
		dispo.append(arr[i])
		dispo.append(arr[i + 1])
		arr1.append(dispo)
	ans = []
	for i in range(len(arr1) - 1):
		ans.append(arr1[i][0])
	for i in arr1[len(arr1) - 1]:
		for j in i:
			ans.append(j)
	ans = ''.join(ans)
	fin_ans.append(ans)
for i in fin_ans:
	print(i)


from fractions import Fraction
import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans
for i in range(int(input())):
	a = input()
	b = list(a)
	c = []
	d = 0
	c.append(b[0])
	for i in range(1, len(b), 2):
		c.append(b[i])
	print(''.join(map(str, c)))


n = int(input())
l = []
for i in range(n):
	i = input()
	if len(i) == 2:
		l += [i]
	else:
		ans = str(i[0])
		for r in range(1, len(i) - 1, 2):
			ans += str(i[r])
		ans += str(i[-1])
		l += [ans]
for u in l:
	print(u)


t = int(input())
for i in range(t):
	s = input()
	if len(s) == 2:
		print(s, '\n')
	else:
		j = 2
		ans = s[0] + s[1]
		while j < len(s) - 1:
			if s[j] == s[j - 1]:
				ans += s[j + 1]
				j = j + 2
			else:
				ans = s[j]
				j = j + 1
		print(ans, '\n')


import sys, math, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
from decimal import Decimal
from fractions import Fraction

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
INF = 10 ** 20
mod = 10 ** 9 + 7
for i in range(int(data())):
	s = data()
	ans = s[0::2] + s[-1]
	out(ans)


T = int(input())
D = []
for i in range(0, T):
	A = input()
	s = (len(A) - 2) // 2
	str = A[0]
	for j in range(1, s + 1):
		str += A[2 * j]
	str += A[len(A) - 1]
	D.append(str)
for i in D:
	print(i)


t = int(input())
for i in range(t):
	c = []
	b = input()
	i = 0
	while i <= len(b) - 2:
		c.append(b[i:i + 2])
		i = i + 2
	answer = c[0]
	for element in c[1:]:
		answer = answer + element[1]
	print(answer)


from sys import stdin, stdout
import sys
from math import *
for __ in range(int(input())):
	s = input()
	ans = s[0]
	for i in range(1, len(s) - 1):
		if i % 2 == 1:
			ans += s[i]
	if len(s) > 1:
		ans += s[-1]
	print(ans)


from itertools import groupby
for _ in range(int(input())):
	s = input()
	Ans = ''
	l = [0]
	res = [len(list(j)) for (_, j) in groupby(list(s[1:-1]))]
	for i in s[2:-1]:
		if l[-1] != i:
			l.append(i)
	l = l[1:]
	for i in range(len(l)):
		Ans += res[i] // 2 * l[i]
	print(s[0] + Ans + s[-1])


for i in range(int(input())):
	s = input()
	if len(s) > 2:
		arr = [s[0]]
		for i in range(1, len(s) - 1, 2):
			arr.append(s[i])
		arr.append(s[-1])
		ans = ''
		for i in arr:
			ans += i
		print(ans)
	else:
		print(s)


for _ in range(int(input())):
	x = input()
	y = x[0:2]
	for i in range(3, len(x), 2):
		y = y + x[i]
	print(y)


n = int(input())
for i in range(n):
	k = input()
	ans = k[0]
	last = k[-1]
	k = k[1:-1]
	even = k[::2]
	odd = k[1::2]
	for i in range(len(even)):
		if even[i] == odd[i]:
			ans += even[i]
		else:
			ans += even[i] + odd[i]
	ans += last
	print(ans)


n = int(input())
for _ in range(n):
	s = input()
	leng = len(s)
	print(s[0], end='')
	for i in range(1, leng - 1):
		cnt = 1
		for j in range(i + 1, leng - 1):
			if s[i] == s[j] and s[i] != '':
				cnt += 1
				if cnt == 2:
					s = s[:j] + '0' + s[j + 1:]
		if cnt > 1 and s[i] != '0':
			print(s[i], end='')
	print(s[leng - 1])


for i in range(int(input())):
	string = input()
	print(string[:2] + string[3::2])


for t in range(int(input())):
	s = list(input())
	if len(s) < 3:
		print(''.join(s))
	else:
		for j in range(1, len(s) - 1, 2):
			s[j] = ''
		print(''.join(s))


test = int(input())
for i in range(test):
	b = input()
	ans = ''
	if len(b) == 2:
		ans = b
	else:
		ans += b[0]
		j = 1
		while j < len(b) - 1:
			ans += b[j]
			j += 2
		ans += b[-1]
	print(ans)


n = int(input())
for i in range(n):
	s = str(input())
	for j in range(0, len(s), 2):
		print(s[j], end='')
	print(s[len(s) - 1])


t = int(input())
ls = list()
for i in range(t):
	s = input()
	ls.append(s)
for l in ls:
	y = ''
	for i in range(len(l)):
		if i % 2 == 0:
			y = y + l[i]
	print(y + l[i])


import os
import sys
from io import BytesIO, IOBase
sys.setrecursionlimit(10 ** 4)
from math import ceil, factorial, floor, gcd, log2, log10, sqrt
from collections import defaultdict as dd, Counter as cc, deque
from itertools import permutations as perm, combinations as comb
from heapq import heapify, heappush, heappushpop, nlargest, nsmallest
inpl = lambda : list(map(int, input().split()))
lstinp = lambda : list(input().split())
inpm = lambda : map(int, input().split())
inps = lambda : int(input())
inp = lambda : input()

def Divisors(n):
	l = []
	i = 2
	while i <= sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	result.append(n)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	t = inps()
	while t:
		s = inp()
		ns = s[:2]
		for i in range(3, len(s), 2):
			ns += s[i]
		print(ns)
		t -= 1
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def fun(s):
	if len(s) == 2:
		return s
	a = list(s[:2])
	for i in range(2, len(s), 2):
		a.append(s[i + 1])
	return ''.join(a)
t = int(input())
for _ in range(t):
	s = input()
	print(fun(s))


t = int(input())
for i in range(t):
	s = input()
	c = []
	for j in s:
		c.append(j)
	k = c[0]
	j = 1
	while j < len(s) - 1:
		k += c[j]
		j += 2
	k += c[-1]
	print(k)


T = int(input())
for i in range(T):
	b = input()
	j = 2
	if len(b) > 2:
		print(b[0], end='')
		print(b[1], end='')
		while j < len(b) - 1:
			print(b[j + 1], end='')
			j = j + 2
		print('')
	else:
		print(b)


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


x = int(input())
for q in range(x):
	l = input()
	ans = ''
	ans += l[0]
	for i in range(1, len(l)):
		if (i - 1) % 2 == 0:
			ans += l[i]
	print(ans)


for i in range(int(input())):
	ans = ''
	inp = input()
	for j in range(len(inp)):
		if j == 0 or j % 2 != 0:
			ans += inp[j]
	print(ans)


for _ in range(int(input())):
	b = str(input())
	s = b[0]
	for i in range(len(b[1:-1])):
		if i % 2 == 0:
			s += b[1 + i]
	print(s + b[-1])


from math import inf as inf
from collections import *
import sys
from itertools import permutations
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	a = input().rstrip('\n')
	s = ''
	s = a[:2]
	for i in range(3, len(a), 2):
		s += a[i]
	print(s)


for i in range(int(input())):
	b = input()
	k = 1
	res = b[0]
	while k < len(b) - 1:
		res += b[k]
		k += 2
	res += b[-1]
	print(res)


T = int(input())
for _ in range(T):
	a = input()
	if len(a) == 2:
		print(a)
	else:
		for i in range(0, len(a), 2):
			print(a[i], end='')
		print(a[-1])


x = int(input())
for i in range(x):
	n = input()
	s = list(n)
	ar = []
	d = ''
	for j in range(0, len(s), 2):
		ar.append(s[j])
	ar.append(s[-1])
	print(d.join(ar))


t = int(input())
strings = [input() for x in range(t)]
for string in strings:
	print(f'{string[::2]}{string[-1]}')


for i in range(int(input())):
	s = input()
	s1 = ''
	s2 = []
	for j in range(len(s)):
		if j == 0:
			s1 += s[j]
		else:
			s2.append(s[j])
	for j in range(0, len(s2), 2):
		s1 += s2[j]
	print(s1)


t = int(input())
while t != 0:
	str = input()
	if len(str) == 2:
		print(str)
	else:
		print(str[0], end='')
		for i in range(len(str)):
			if i % 2 != 0:
				print(str[i], end='')
		print()
	t = t - 1


from sys import stdin
_input = stdin.readline
(_str, _range, _len, _int) = (str, range, len, int)

def solution():
	for _ in _range(_int(_input())):
		s = _input().rstrip('\n')
		for i in _range(0, _len(s), 2):
			print(s[i], end='')
		print(s[-1])
solution()


def f(b):
	n = len(b)
	a = b[0]
	for i in range(1, n - 1, 2):
		a += b[i]
	a += b[n - 1]
	return a
for w in range(int(input())):
	b = str(input())
	print(f(b))


test = int(input())
test_arr = []
for _ in range(test):
	string = str(input())
	if len(string) > 2:
		temp = string[0]
		for i in string[1:-1:2]:
			temp = temp + i
		temp = temp + string[-1]
		test_arr.append(temp)
	else:
		test_arr.append(string)
for t in test_arr:
	print(t)


for _ in range(int(input())):
	x = input()
	out = ''
	for i in range(0, len(x), 2):
		out += x[i]
		if i + 2 == len(x):
			out += x[i + 1]
	print(out)


n = int(input())
for i in range(n):
	s = input()
	k = len(s) // 2 % 2
	c = ''
	for j in range(0, len(s), 4):
		c = c + s[j] + s[j + 1]
	if k == 0:
		c = c + s[-1]
	print(c)


t = int(input())
answer = []
for a in range(t):
	fin = ''
	line = list(input())
	fin += line[0]
	for b in range(1, len(line) - 1, 2):
		fin += line[b]
	fin += line[len(line) - 1]
	answer.append(fin)
for c in answer:
	print(c)


for _ in range(int(input())):
	s = input()
	p = ''
	if len(s) <= 2:
		print(s)
	else:
		p = p + s[0] + s[1]
		for i in range(3, len(s), 2):
			p = p + s[i]
	print(p)


for _ in range(int(input())):
	l = list(input())
	s = []
	if len(l) <= 3:
		print(''.join(l))
	else:
		for i in range(len(l)):
			if i == 0:
				s.append(l[i])
			elif i % 2 == 1:
				s.append(l[i])
		print(''.join(s))


t = int(input())
for i in range(t):
	s = list(input())
	rem = []
	if len(s) == 2:
		print(''.join(s))
	else:
		rem.append(s[0])
		new = s[-1]
		s.pop(-1)
		s.pop(0)
		j = 0
		while j < len(s) - 1:
			rem.append(s[j])
			j += 2
		print(''.join(rem) + new)


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


t = int(input())
a = list()
for i in range(0, t):
	e = input()
	a.append(e)
for i in range(0, t):
	b = a[i]
	count = 2
	l = len(b)
	if l != 2:
		while count < l:
			b = b[:count] + b[count + 1:]
			count = count + 1
	print(b)


testcases = int(input())
for testcase in range(testcases):
	x = input()
	(chunks, chunk_size) = (len(x), 2)
	arr = [x[i:i + chunk_size] for i in range(0, chunks, chunk_size)]
	ans = ''
	flag = 0
	for i in arr:
		if flag == 0:
			flag = 1
			ans += i
			continue
		if len(i) == 1:
			continue
		ans += i[-1]
	print(ans)


for i in range(int(input())):
	x = input()
	l = x[0]
	if len(x) == 2:
		print(x)
	else:
		for i in range(1, len(x), 2):
			l = l + x[i]
		print(l)


t = int(input())
for _ in range(t):
	b = input()
	l = len(b)
	a = ''
	if l % 2 == 0:
		i = 0
		while i < l:
			a += b[i]
			i += 2
		a += b[l - 1]
	else:
		i = 0
		while i < l:
			a += b[i]
			i += 2
	print(a)


t = int(input())
for i in range(t):
	s = input()
	k = 0
	new_s = ''
	while k < len(s):
		new_s += s[k]
		k += 2
	new_s += s[-1]
	print(new_s)


import sys
read = lambda : sys.stdin.readline()
T = int(read())
for t in range(T):
	s = read()
	print(s[:-1:2] + s[-2])


for _ in range(int(input())):
	b = input()
	a = b[0]
	i = 1
	while i < len(b) - 1:
		if b[i] == b[i + 1]:
			a += b[i]
			i += 1
		i += 1
	a += b[len(b) - 1]
	print(a)


import math
t = int(input())
for cnt in range(t):
	b = input()
	a = ''
	for i in range(len(b)):
		if i < 2:
			a += b[i]
		elif i % 2 != 0:
			a += b[i]
	print(a)


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


for i in range(int(input())):
	t = input()
	tt = list(t)
	s = ''
	i = 0
	while i < len(tt) - 1:
		if tt[i] != tt[i + 1]:
			s = s + tt[i]
			i = i + 1
		else:
			s = s + tt[i + 1]
			i = i + 2
	s = s + tt[-1]
	print(s)


cases = int(input())
for v in range(cases):
	n = input()
	s = n[0] + n[1]
	i = 2
	while i < len(n):
		s = s + n[i + 1]
		i = i + 2
	print(s)


t = int(input())
l = []
r = []
for i in range(t):
	s = input()
	l.append(s)
	r.append(l[i][0::2] + l[i][-1])
for i in range(t):
	print(r[i])


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


T = int(input())
for isc in range(T):
	s = input()
	n = len(s)
	if n == 2:
		print(s)
	else:
		ret = s[0]
		i = 1
		while i < n:
			ret += s[i]
			i += 2
		print(ret)


for i in range(int(input())):
	n = input()
	l = len(n)
	a = ''
	if l == 2:
		print(n)
	else:
		for i in range(0, l):
			if i == 0:
				a = a + n[i]
			elif i % 2 != 0:
				a = a + n[i]
		print(a)


from sys import *
t = int(stdin.readline())
for _ in range(t):
	b = stdin.readline()
	a = []
	for i in range(0, len(b) - 1, 2):
		if i == 0:
			a.append(b[i])
			a.append(b[i + 1])
		else:
			a.append(b[i + 1])
	for i in range(len(a)):
		stdout.write(str(a[i]))
	print()


t = int(input())
for i in range(t):
	b = input()
	l = []
	for j in range(2, len(b) + 1, 2):
		l.append(b[j - 2:j])
	a = l[0]
	del l[0]
	for j in l:
		a = a + j[1]
	print(a)


def readintlst():
	return list(map(int, input().split(' ')))

def readn():
	return int(input())
N = readn()
for _ in range(N):
	S = input()
	if len(S) == 2:
		print(S)
	else:
		print(S[0] + S[1::2])


for _ in range(int(input())):
	s = input().strip()
	if len(s) == 2:
		print(s)
	else:
		n = len(s)
		ans = []
		for i in range(0, n, 2):
			ans.append(s[i])
		ans.append(s[n - 1])
		print(''.join((str(a) for a in ans)))


test = int(input())
for t in range(test):
	array = input()
	answer = []
	answer.append(array[0])
	for i in range(1, len(array) - 1, 2):
		answer.append(array[i])
	answer.append(array[len(array) - 1])
	print(''.join(answer))


t = int(input())
for tc in range(t):
	b = input()
	list_b = list(map(str, b))
	for i in range(0, len(list_b), 2):
		print(list_b[i], end='')
	print(list_b[len(list_b) - 1])


T = int(input())

def getResult(S):
	for i in range(0, len(S), 2):
		print(S[i], end='')
	print(S[-1])
for _ in range(T):
	S = input()
	getResult(S)


t = int(input())
for i in range(t):
	x = input()
	print(x[:2] + x[3::2])


t = int(input())
for _ in range(t):
	string = input()
	arr = list(string)
	first = arr.pop(0)
	last = arr.pop()
	final = []
	final += [first]
	for i in range(0, len(arr), 2):
		final += [arr[i]]
	final += [last]
	print(''.join(final))


t = int(input())

def fun(b):
	a = ''
	a += b[0] + b[1]
	for i in range(3, len(b), 2):
		a += b[i]
	print(a)
while t:
	t -= 1
	b = input()
	fun(b)


a = int(input())
b = 0
while a > b:
	c = input()
	d = 0
	e = ''
	while d < len(c):
		if d == len(c) - 1:
			e = e + c[d]
		if d % 2 == 0:
			e = e + c[d]
		d = d + 1
	print(e)
	b = b + 1


T = int(input())
for t in range(T):
	s = input()
	n = len(s)
	res = s[0]
	i = 1
	while i < n - 1:
		if s[i] == s[i + 1]:
			res += s[i]
			i += 2
		else:
			res += s[i]
			i += 1
	res += s[-1]
	print(res)


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


a = int(input())
i = 0
while i < a:
	c = input()
	e = []
	d = 0
	while d < len(c):
		if d % 2 == 0:
			e.append(c[d])
		if d == len(c) - 1:
			e.append(c[d])
		d = d + 1
	print(''.join(e))
	i = i + 1


t = int(input())
for test in range(t):
	b = str(input())
	n = len(b)
	letters = [b[i - 1] for i in range(n) if i % 2 == 1]
	letters.append(b[-1])
	print(''.join(letters))


for _ in range(int(input())):
	s = input()
	i = 0
	n = len(s)
	ans = ''
	while i < n:
		if i in (0, n - 1):
			ans += s[i]
		else:
			ans += s[i]
			i += 1
		i += 1
	print(ans)


for i in range(int(input())):
	b = list(input())
	s = ''
	if b.count(b[0]) == len(b):
		l = len(b) // 2
		s = b[0] * (l + 1)
	else:
		c = 0
		b.append(' ')
		for i in range(len(b) - 1):
			if b[i] == b[i + 1]:
				c += 1
				continue
			else:
				s += b[i] * (c // 2 + 1)
				c = 0
	print(s)


for i in range(int(input())):

	def sub(st):
		if len(st) == 2:
			return st
		else:
			a = ''
			a = a + st[0]
			for i in range(1, len(st) - 1, 2):
				a = a + st[i]
		return a + st[len(st) - 1]
	st = input()
	print(sub(st))


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


t = int(input())
for i in range(t):
	b = input()
	lst = list(b)
	n = len(lst)
	first = lst[0]
	last = lst[n - 1]
	lst1 = []
	if n == 2:
		print(b)
	else:
		for j in range(1, n - 1):
			if j % 2 != 0:
				lst1.append(lst[j])
		mid = ''.join(lst1)
		print(first + mid + last)


from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, itertools, math
sys.setrecursionlimit(10 ** 5)
input = sys.stdin.readline
sqrt = math.sqrt

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

def LF():
	return list(map(float, input().split()))

def LI_():
	return list(map(lambda x: int(x) - 1, input().split()))

def II():
	return int(input())

def IF():
	return float(input())

def S():
	return input().rstrip()

def LS():
	return S().split()

def IR(n):
	res = [None] * n
	for i in range(n):
		res[i] = II()
	return res

def LIR(n):
	res = [None] * n
	for i in range(n):
		res[i] = LI()
	return res

def FR(n):
	res = [None] * n
	for i in range(n):
		res[i] = IF()
	return res

def LIR(n):
	res = [None] * n
	for i in range(n):
		res[i] = IF()
	return res

def LIR_(n):
	res = [None] * n
	for i in range(n):
		res[i] = LI_()
	return res

def SR(n):
	res = [None] * n
	for i in range(n):
		res[i] = S()
	return res

def LSR(n):
	res = [None] * n
	for i in range(n):
		res[i] = LS()
	return res
mod = 1000000007
inf = float('INF')

def solve():
	t = II()
	for i in range(t):
		s = S()
		s = s + s[-1]
		for i in range(0, len(s), 2):
			print(s[i], end='')
		print()
	return
solve()


import io
import os

def solve():
	s = input()
	t = s[0] + s[1::2]
	print(str(t))
t = int(input())
for _ in range(t):
	solve()


for _ in range(int(input())):
	x = input()
	for i in range(len(x)):
		if i == 0:
			print(x[i], end='')
		elif i % 2 != 0:
			print(x[i], end='')
	print('')


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


from sys import stdin
a = int(stdin.readline())
for k in range(0, a):
	A = stdin.readline()
	ans = ''
	ans += A[0]
	for j in range(1, len(A) - 1, 2):
		if j == len(A) - 3:
			ans += A[len(A) - 2]
			break
		else:
			ans += A[j]
	print(ans)


t = int(input())
for _ in range(t):
	s = input()
	if len(s) == 1:
		print(s)
		continue
	for i in range(0, len(s), 2):
		print(s[i], end='')
	print(s[-1])


t = int(input())
while t != 0:
	b = input()
	a = ''
	if len(b) == 2:
		print(b)
	elif len(b) > 2:
		i = 0
		while i < len(b) - 1:
			a = a + b[i]
			i = i + 2
		a = a + b[-1]
		print(a)
	t = t - 1


for _ in range(int(input())):
	data = input()
	first = data[0]
	last = data[-1]
	data = data[1:-1]
	print(first + data[::2] + last)


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


t = int(input())
for _ in range(0, t):
	n = input()
	a = []
	for i in range(0, len(n) - 1, 2):
		z = n[i] + n[i + 1]
		a.append(z)
	d = a[0][0]
	for i in range(1, len(a)):
		if a[i][0] in a[i - 1]:
			d = d + a[i][0]
		else:
			d = d + a[i][1]
	d = d + a[i][1]
	print(d)


t = int(input())
for x in range(t):
	k = str(input())
	i = 1
	while i < len(k) - 1:
		if k[i] == k[i + 1]:
			k = k[:i] + k[i + 1:]
			i = i + 1
	print(k)


import math

def shrey():
	s = list(input())
	l = len(s)
	ans = ''
	for i in range(l):
		if i == 0 or i == l - 1 or i % 2 != 0:
			ans += s[i]
	print(ans)
T = input()
T = int(T)
for q in range(1, T + 1):
	shrey()


def short(b):
	ans = b[0]
	for index in range(len(b)):
		if index % 2 == 1:
			ans += b[index]
	return ans
t = int(input())
answers = []
for test in range(t):
	b = input()
	ans = short(b)
	answers.append(ans)
for ans in answers:
	print(ans)


for _ in range(int(input())):
	s = input()
	lst = []
	n = len(s)
	for i in range(0, n, 2):
		lst.append(s[i] + s[i + 1])
	sa = ''
	for i in lst[0:-1]:
		sa = sa + i[0]
	print(sa + lst[-1])


def fun(s):
	nw = s[0]
	for i in range(1, len(s) - 1, 2):
		nw += s[i]
	nw += s[len(s) - 1]
	return nw
a = int(input())
for _ in range(a):
	s = input()
	if len(s) <= 2:
		print(s)
	else:
		print(fun(s))


for _ in range(int(input())):
	a = input()
	l = []
	for i in range(len(a)):
		if i % 2 == 0:
			l.append(a[i])
	print(''.join(l) + str(a[-1]))


import math
import bisect
import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
T = int(input())
for t in range(T):
	b = insr()
	a = ''
	l = len(b)
	for i in range(0, l, 2):
		a += b[i]
	a += b[-1]
	print(a)


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


def solve():
	s = input()
	n = len(s)
	ans = ''
	for i in filter(lambda x: x % 2 == 0, range(n)):
		ans += s[i]
	ans += s[n - 1]
	print(ans)
for _ in range(int(input())):
	solve()


t = int(input(''))
a_strings = []
for i in range(t):
	a_strings.append(input(''))
for a in a_strings:
	l = len(a)
	if l == 2:
		print(a)
	else:
		print(a[::2] + a[-1])


def fuin(string):
	res = string[0]
	for i in range(1, len(string) - 1, 2):
		if string[i] == string[i + 1]:
			res += string[i]
	return res + string[-1]
tc = int(input())
for _ in range(tc):
	string = str(input())
	print(fuin(string))


t = int(input())
for _ in range(t):
	b = input()
	output = b[:2]
	for i in range(2, len(b)):
		if i % 2 != 0:
			output += b[i]
	print(output)


import sys
import bisect as b
import math
from collections import defaultdict as dd
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
for _ in range(int(input())):
	s = list(sin().strip())
	n = len(s)
	if n > 2:
		ans = []
		s1 = s[1:n - 1]
		for i in range(0, len(s1), 2):
			ans += [s1[i]]
		ans = [s[0]] + ans + [s[-1]]
		print(''.join([i for i in ans]))
	else:
		print(''.join([i for i in s]))


import math
t = int(input())
for i in range(t):
	word = input()
	ans = ''
	if len(word) == 1 or len(word) == 2:
		print(word)
	else:
		ans = ans + word[0] + word[1]
		for j in range(3, len(word) + 1, 2):
			ans = ans + word[j]
		print(ans)


t = int(input())
for test in range(t):
	strin = input()
	size = len(strin)
	if size == 2:
		print(strin)
	else:
		ans = strin[0]
		for i in range(1, size - 1):
			if i % 2 != 0:
				ans = ans + strin[i]
		ans = ans + strin[size - 1]
		print(ans)


t = int(input())
for x in range(t):
	a = input()
	l = len(a) - 2
	if l == 0:
		print(a)
	else:
		b = a[:2]
		for y in range(3, l + 2, 2):
			b = b + a[y]
		print(b)


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


import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque, Counter
from decimal import Decimal

def s():
	return input()

def i():
	return int(input())

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

def I():
	return map(int, input().split())

def L():
	return list(input().split())

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

def lcm(a, b):
	return a * b // math.gcd(a, b)
sys.setrecursionlimit(10 ** 9)
mod = 10 ** 9 + 7
t = i()
for i in range(t):
	a = list(s())
	b = [a[0]]
	for j in range(1, len(a) - 2, 2):
		if a[j] == a[j + 1]:
			b.append(a[j])
	b.append(a[-1])
	print(''.join(b))


for _ in range(int(input())):
	string = input()
	s = string[0]
	i = 1
	while i < len(string):
		st = string[i]
		s = s + st
		i = i + 2
	print(s)


n = int(input())
for i in range(n):
	a = input()
	b = a[0:2]
	c = a[3:len(a):2]
	d = b + c
	print(d)


t = int(input())
for _ in range(t):
	b = input()
	res = b[:2]
	for i in range(1, len(b) // 2):
		res += b[2 * i + 1]
	print(res)


import os
import math

def solution():
	t = int(input())
	while t > 0:
		s = input()
		s1 = s[0]
		i = 1
		while i < len(s):
			s1 += s[i]
			i += 2
		print(s1)
		t -= 1
solution()


size = int(input())
l = []
for i in range(size):
	l.append(input())
for i in l:
	if len(i) == 2:
		print(i)
	else:
		print(i[::2] + i[-1])


for i in [*open(0)][1:]:
	print(i[:-1:2] + i[-2])


n = int(input())
for test in range(n):
	s = input()
	y = []
	for i in range(0, len(s), 2):
		y.append(s[i])
	y.append(s[-1])
	print(''.join(y))


for _ in range(int(input())):
	s = input().strip()
	g = s[0]
	k = 0
	for i in range(1, len(s)):
		if s[i] == s[i - 1] and k != 1:
			k = 1
		else:
			g += s[i]
			k = 0
	if k == 1:
		g += s[-1]
	print(g)


from math import *
from copy import *
from string import *
from random import *
from sys import stdin, stdout
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math
import math
import time
from queue import Queue

def seive(n):
	l = [True]
	l = l * (n + 1)
	for i in range(2, int(sqrt(n)) + 1):
		if l[i] == True:
			val = i * i
			while val < len(l):
				l[val] = False
				val += i
	prime = []
	for i in range(2, len(l)):
		if l[i] == True:
			prime.append(i)
	return prime

def dp(l, i, n, val, ans):
	if i >= n or val < 0:
		return 1000000
	elif val == 0:
		return 0
	else:
		if ans[i] == 1000000:
			ans[i] = min(min(1 + dp(l, i + 1, n, val - l[i], ans), 1 + dp(l, i, n, val - l[i], ans)), dp(l, i + 1, n, val, ans))
		return ans[i]
from queue import Queue

def factors(n):
	l = []
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def check1(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v -= 1

def check2(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v += 1

def s(a):
	ans = a[0:1]
	i = 1
	while i < len(a) - 1:
		ans += a[i:i + 1]
		i += 2
	ans += a[len(a) - 1:]
	return ans
t = int(input())
for i in range(t):
	a = str(input())
	print(s(a))


from collections import Counter
from collections import defaultdict
from collections import deque
import math
import heapq
import sys
import io, os
input = sys.stdin.readline
from bisect import *
rs = lambda : input().strip()
ri = lambda : int(input())
rl = lambda : list(map(int, input().strip().split()))
rls = lambda : list(map(str, input().split()))
t = int(input())
for _ in range(0, t):
	s = input().strip()
	ans = ''
	for i in range(0, len(s), 2):
		ans = ans + s[i]
	ans = ans + s[-1]
	print(ans)


t = int(input())
for _ in range(t):
	l = []
	s = input()
	if len(s) > 2:
		l.append(s[0])
		for i in range(1, len(s), 2):
			l.append(s[i])
	else:
		l.append(s)
	print(''.join(l))


T = int(input())
for test in range(T):
	b = input()
	a = [b[0]]
	for i in range(1, len(b) - 1, 2):
		a.append(b[i])
	a.append(b[-1])
	print(''.join(a))


n = int(input())
for t in range(n):
	L0 = input()
	L = [L0[2 * i:2 * i + 2] for i in range(len(L0) // 2)]
	for i in range(len(L) - 1):
		if L[i][1] == L[i + 1][0]:
			L[i] = L[i][0]
	print(''.join(L))


fr = []
test_case = int(input())

def bob():
	global pop1
	global pop2
	global even
	input_list = list(input())
	pop1 = input_list.pop(0)
	pop2 = input_list.pop()
	even = input_list[::2]

def panda():
	fr.append(pop1)
	while even != 0:
		for x in even:
			fr.append(x)
		break
	fr.append(pop2)
	fr.append('\n')
while test_case > 0:
	bob()
	panda()
	test_case = test_case - 1
for r in fr:
	print(r, end='')


t1 = int(input())
for i in range(t1):
	s = str(input())
	t = ''
	t = s[0]
	for i in range(len(s)):
		p = s[i:i + 1]
		if i % 2 == 1:
			t += p
	print(t)


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


for _ in range(int(input())):
	a = input().lower()
	b = ''
	if len(a) == 2:
		b = a
	elif len(a) > 2:
		b += a[0] + a[1:-1:2] + a[-1]
	print(b)


q = int(input())
d = []
for i in range(q):
	a = input()
	b = list(a)
	c = []
	z = len(b)
	if len(b) == 2:
		d.append(a)
	else:
		for i in range(0, z - 2, 2):
			c.append(b[i])
			if b[i + 1] == b[i + 2]:
				continue
			c.append(b[i + 1])
		if b[z - 3] == b[z - 2]:
			c.append(b[z - 3])
		elif b[z - 2] != b[z - 3]:
			c.append(b[z - 2])
			c.append(b[z - 3])
		c.append(b[z - 1])
		d.append(''.join(c))
for i in range(len(d)):
	print(d[i])


n = int(input())
for h in range(n):
	s = input()
	lst = []
	lst.append(s[0])
	for i in range(1, len(s)):
		if i % 2 == 1:
			lst.append(s[i])
	for i in range(len(lst)):
		if i == len(lst) - 1:
			print(lst[i])
		else:
			print(lst[i], end='')


t = int(input())
for _ in range(t):
	s = input()
	print(s[:2], end='')
	if len(s) > 2:
		for i in range(3, len(s), 2):
			print(s[i], end='')
	print()


t = int(input())

def split(n):
	word = ' '
	num = 0
	l = len(n)
	s = []
	for i in range(l):
		if i % 2 == 0:
			word += n[i]
			word += n[i + 1]
		else:
			if len(word) != 0:
				s.append(word)
			word = ' '
	return s
for i in range(t):
	n = str(input())
	k = []
	k = split(n)
	f = []
	f.append(k[0])
	k2 = k[1:]
	for i in k2:
		f.append(i[-1])
	n1 = ''
	for i in f:
		n1 += i
	print(n1)


from math import *
from random import randint
n = int(input())
i = 1
while i <= n:
	a = input()
	lent = len(a)
	print(a[0], end='')
	for j in range(1, lent + 1, 2):
		print(a[j], end='')
	print()
	i = i + 1


problem = int(input())
for i in range(problem):
	letter = list(input())
	stop = int((len(letter) - 2) / 2 + 2)
	if stop > 2:
		for p in range(2, stop):
			del letter[p]
	print(''.join(letter))


t = int(input())
while t > 0:
	t -= 1
	s = str(input())
	x = []
	for i in s:
		x += [str(i)]
	f = str(x[0])
	x.pop(0)
	l = str(x[-1])
	x.pop(-1)
	z = 2
	ans = f
	for j in x:
		if z % 2 == 0:
			ans += j
			z = 1
		else:
			z = 2
	ans += l
	print(ans)


import sys

def calculate(word):
	output = [word[0], word[1]]
	if len(word) >= 4:
		for index in range(3, len(word), 2):
			output.append(word[index])
	return ''.join(output)
inputs = []
numOfInput = input()
for lineInput in range(0, int(numOfInput)):
	result = calculate(sys.stdin.readline())
	print(result)


def ans(s):
	n = len(s)
	i = 0
	ans = ''
	while i < n:
		if i <= 1:
			ans += s[i]
		elif i > 1 and i % 2 != 0:
			ans += s[i]
		i += 1
	return ans
t = int(input())
for i in range(t):
	string = str(input())
	print(ans(string))


def xx(a):
	if len(a) == 2:
		print(a)
	else:
		c = []
		for x in range(0, len(a) - 1, 2):
			c.append(a[x])
		c.append(a[len(a) - 1])
		res = ''.join(c)
		print(res)
t = int(input())
for _ in range(t):
	a = input()
	xx(a)


case = int(input())
for y in range(case):
	a = list(input())
	b = ''
	skip = 0
	for x in range(len(a)):
		if skip == 1 and x != len(a) - 1:
			skip = 0
			continue
		b += a[x]
		skip = 1
	print(b)


from sys import stdin, stdout
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()
import math
from collections import Counter

def solve():
	s = S()
	l = len(s)
	a = s[0]
	for i in range(1, l, 2):
		a += s[i]
	print(a)
for i in range(IN()):
	solve()


t = int(input())
answers = ['0' for i in range(t)]
for i in range(t):
	b = input()
	j = 2
	a = b[0:1]
	while j <= (len(b) + 2) / 2:
		a = a + b[2 * j - 3]
		j += 1
	answers[i] = a
for answer in answers:
	print(answer)


t = int(input())
for asd in range(t):
	b = input()
	a = []
	for i in range(0, len(b), 2):
		a.append(b[i])
	a.append(b[-1])
	print(''.join(a))


def solve(b):
	a = list()
	l = len(b)
	for i in range(0, l, 2):
		a.append(b[i])
	if l % 2 == 0:
		a.append(b[-1])
	return ''.join(a)
t = int(input())
results = list()
for i in range(0, t):
	b = input()
	results.append(solve(b))
for result in results:
	print(result)


n = int(input())
q = []
result = []
for i in range(n):
	q.append(input())
for str in q:
	s = ''
	for i in range(len(str)):
		if i < 2:
			s = s + str[i]
		elif i % 2 != 0:
			s = s + str[i]
	result.append(s)
for i in result:
	print(i)


for _ in range(int(input())):
	s = str(input())
	st = s[0:2]
	for i in range(3, len(s), 2):
		st = st + ''.join(s[i])
	print(st)


tests = int(input())
for i in range(tests):
	line = input()
	res = ''
	for x in range(len(line)):
		if x % 2 == 0:
			res += line[x]
	res += line[len(line) - 1]
	print(res)


tests = int(input())
for _ in range(tests):
	a = input().strip() + '  '
	s = [a[i:i + 2] for i in range(0, len(a), 2)]
	print(s[0] + ''.join([c[1] for c in s[1:]]))


def main():
	t = int(input())
	for i in range(t):
		b = list(input())
		cur = ['', '']
		(cur[0], cur[1]) = (b[0], b[1])
		if len(b) > 2:
			for j in range(3, len(b), 2):
				cur.append(b[j])
		print(''.join(cur))
main()


import math
import sys
input = sys.stdin.readline
for _ in range(int(input())):
	b = input()
	ans = b[0]
	for i in range(1, len(b), 2):
		ans += b[i]
	print(ans)


test_case = int(input())
for i in range(test_case):
	string = list(input())
	val = []
	for i in range(0, len(string), 2):
		val.append(string[i])
	val.append(string[len(string) - 1])
	print(''.join(val))


for _ in range(int(input())):
	given = list(input())
	lst = []
	i = 0
	length = len(given)
	while i < length:
		lst.append(given[i])
		i += 2
	if length % 2 == 0:
		lst.append(given[-1])
	print(''.join(lst))


t = int(input())
for ex in range(t):
	b = str(input())
	a = str()
	a += b[0] + b[1]
	for i in range(1, len(b) // 2):
		a += b[i * 2 + 1]
	print(a)


T = int(input())
for i in range(T):
	a = input()
	b = [char for char in a]
	l = []
	for i in range(0, len(a) - 1, 2):
		l.append(b[i])
	l.append(b[-1])
	print(''.join(l))


num = int(input())
for k in range(num):
	a = input()
	print(a[0], end='')
	i = 1
	while i < len(a) - 1:
		print(a[i], end='')
		i += 2
	print(a[i])


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def main():

	def solve():
		bb = input()
		aa = bb[::2] + bb[-1]
		print(aa)
	t = int(inputi())
	for _ in range(t):
		solve()
main()


def process():
	strg = input()
	i = 0
	ret = ''
	while i < len(strg):
		ret += strg[i]
		i += 2
	return ret + strg[-1]
for I in range(int(input())):
	print(process())


for _ in range(int(input())):
	s = input()
	li = []
	for i in range(0, len(s), 2):
		li.append(s[i] + s[i + 1])
	mains = li[0]
	s = li[0][1]
	for i in li[1:]:
		if s == i[0]:
			mains += i[1]
		else:
			mains += i
		s = i[1]
	print(mains)


n = int(input())
while n > 0:
	s = input()
	ans = ''
	i = 0
	while i + 2 <= len(s):
		ans += s[i:i + 2]
		i += 4
	if len(s) % 2 != 0 or len(s) % 4 == 0:
		ans += s[-1]
	print(ans)
	n -= 1


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	S = input()
	N = len(S)
	ans = ''
	ans += S[0]
	for i in range(1, N - 1, 2):
		ans += S[i]
	ans += S[-1]
	print(ans)


k = int(input())
for i in range(k):
	d = input()
	n = [d[j:j + 2] for j in range(len(d)) if j % 2 == 0]
	o = n[0]
	for j in range(1, len(n)):
		o = o + n[j][1]
	print(o)


for _ in range(int(input())):
	n = list(input())
	i = 1
	l = len(n)
	c = 0
	a = []
	a.append(n[0])
	while i < l - 1:
		if n[i] == n[i + 1]:
			a.append(n[i])
			i = i + 2
		else:
			i = i + 1
	a.append(n[-1])
	print(''.join(a))


TC = int(input())
for t_itr in range(TC):
	S = input()
	result = []
	for i in range(0, len(S), 2):
		result.append(S[i])
	result.append(S[-1])
	print(''.join(result))


n = int(input())
for _ in range(n):
	a = list(input())
	b = a
	for i in range(2, len(a), 2):
		if a[i] == a[i - 1]:
			c = a[i:].index(a[i]) + i
			b[c] = ''
	print(''.join(b))


t = int(input())
for _ in range(t):
	x = input()
	ans = ''
	j = 0
	a = len(x) - 1
	while j < a:
		if x[j] == x[j + 1]:
			ans += x[j]
			j += 2
		else:
			ans += x[j]
			j += 1
	ans += x[len(x) - 1]
	print(ans)


for _ in range(int(input())):
	st = input()
	print(st[:2] + st[3::2])


from collections import defaultdict
for _ in range(int(input())):
	s = list(input())
	i = 0
	for i in range(len(s)):
		if not i & 1:
			print(s[i], end='')
	print(s[-1])


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


t = int(input())
for _ in range(t):
	x = input()
	s = x[0] + x[2:4]
	if len(x) > 4:
		for i in range(5, len(x), 2):
			s += x[i]
	if len(x) == 2:
		print(x)
	else:
		print(s)


from collections import deque, defaultdict
import sys
sys.setrecursionlimit(10000000)
mod = 10 ** 9 + 7

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

def I():
	return int(input())
for i in range(I()):
	s = input()
	ans = ''
	twi = True
	ans += s[0]
	prv = s[0]
	cnt = 0
	for i in range(len(s)):
		if prv == s[i] and cnt == 0:
			prv = s[i]
			cnt += 1
		else:
			ans += s[i]
			prv = s[i]
			cnt = 0
	print(ans)


def ab(b):
	c = b[0::2] + b[-1]
	print(c)
t = int(input())
list = []
for i in range(0, t):
	list.append(input())
for i in range(0, len(list)):
	ab(list[i])


t = int(input())
for i in range(t):
	s = input()
	print(s[0], end='')
	for i in range(1, len(s)):
		if i & 1:
			print(s[i], end='')
	print()


for i in range(int(input())):
	s = input()
	n = len(s)
	i = 0
	while i < n:
		print(s[i:i + 2], end='')
		i = i + 4
	print(s[i - 1:])


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


def main():
	t = int(input())
	for _ in range(t):
		a = input()
		if len(a) == 2:
			print(a)
		else:
			b = a[1::2]
			b = a[0] + b
			print(b)
main()


n = int(input())

def solve(s):
	strings = list(s)
	out = [strings[0]]
	for i in range(1, len(strings), 2):
		out.append(strings[i])
	[print(_, end='') for _ in out]
	print()
for _ in range(n):
	s = input()
	solve(s)


def solution():
	for _ in range(int(input())):
		s = input()
		ans = ''
		n = len(s)
		i = 1
		ans += s[0]
		while i < n - 1:
			ans += s[i]
			i += 2
		ans += s[n - 1]
		print(ans)
solution()


import os
import sys
t = int(input())
for k in range(t):
	s = input()
	length = len(s)
	print(s[0], end='')
	for i in range(1, length - 1, 2):
		print(s[i], end='')
	print(s[length - 1])


p = int(input())
while p > 0:
	p = p - 1
	n = input()
	ls = list()
	count = 0
	for i in range(0, len(n)):
		if len(n) < 3:
			print(n)
			break
		if i == 0 or i == len(n) - 1:
			ls.append(n[i])
			continue
		if i % 2 == 0:
			ls.append(n[i])
	a = ''.join(ls)
	print(a)


import sys, math
from collections import deque

def solve():
	s = input()
	a = ''
	a += s[0]
	for i in range(1, len(s) - 1, 2):
		a += s[i]
	a += s[-1]
	print(a)
	return
for _ in range(int(input())):
	solve()


n = int(input())
for i in range(n):
	b = input()
	L = list(b)
	i = 1
	X = [L[0]]
	X.extend(L[1:len(b) - 1:2])
	X.append(L[-1])
	print(''.join(X))


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


n = int(input())
for i in range(n):
	s = list(input())
	res = ''
	res = res + s[0]
	res = res + s[1]
	for i in range(3, len(s), 2):
		res = res + s[i]
	print(res)


import math
from sys import stdin
from collections import Counter, defaultdict, deque
input = stdin.readline
mod = pow(10, 9) + 7

def solve():
	s = input().strip()
	s1 = ''
	n = len(s)
	if n == 2:
		print(s)
		return
	for i in range(n):
		if i % 2 == 0:
			s1 = s1 + s[i]
	s1 = s1 + s[-1]
	print(s1)
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	b = input()
	if len(b) == 2:
		print(b)
	else:
		a = ''.join(list(b)[::2])
		a += b[-1]
		print(a)


t = int(input())
ans = list()
for i in range(t):
	word = list(input())
	new = list()
	for j in range(len(word)):
		if j % 2 == 0:
			new.append(word[j])
	new.append(word[-1])
	line = ''.join([str(i) for i in new])
	ans.append(line)
for i in range(t):
	print(ans[i])


def helper(s):
	if len(s) <= 2:
		return s
	else:
		t = s[0]
		n = len(s)
		for i in range(1, n - 2, 2):
			t += s[i]
		t += s[-1]
		return t
for _ in range(int(input())):
	x = input()
	print(helper(x))


t = int(input())
while t > 0:
	t -= 1
	txt = input()
	ans = ''
	for a in txt[1:-1:2]:
		ans += a
	print(txt[0] + ans + txt[-1])


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	b = input()[:-1]
	ans = [b[0]]
	for i in range(1, len(b) - 1, 2):
		ans.append(b[i])
	ans.append(b[-1])
	print(''.join(ans))


n = int(input())
l = []
for i in range(n):
	l.append(input())
for i in l:
	print(i[0], end='')
	for j in range(1, len(i) - 1, 2):
		print(i[j], end='')
	print(i[-1])


def res(s):
	if len(s) == 2:
		return s
	l = s[1:len(s) - 1]
	q = ''
	for i in range(0, len(l), 2):
		q += l[i]
	return s[0] + q + s[len(s) - 1]
t = int(input())
for i in range(t):
	s = input()
	print(res(s))


n = int(input())
l = []
for i in range(n):
	l.append(input())
for s in l:
	m = len(s)
	b = s[0]
	for i in range(1, m, 2):
		b += s[i]
	print(b)


t = int(input())
for t1 in range(t):
	s = input()
	s = list(s)
	rem = list()
	for data in range(len(s)):
		if data == 0 or data % 2 == 1:
			rem.append(s[data])
	rem = ''.join(rem)
	print(rem)


for _ in range(int(input())):
	a = input()
	s = a[0]
	e = a[len(a) - 1]
	a = a[1:len(a) - 1]
	ss = ''
	for j in range(len(a)):
		if j % 2 != 0:
			ss += a[j]
	print(s + ss + e)


q = int(input())
for z in range(q):
	s = input()
	print(s[0], end='')
	for i in range(1, s.__len__(), 2):
		print(s[i], end='')
	print()


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	b = stdin.readline().strip()
	b = list(b)
	b = b[::-1]
	s = b[0]
	for i in range(1, len(b), 2):
		s += b[i]
	s = s[::-1]
	print(s)


s = int(input())
v = []
o = []
for i in range(s):
	v.append(input())
for i in range(s):
	b = 3
	o.append(v[i][0:2])
	while b <= len(v[i]):
		o[i] += v[i][b]
		b += 2
for i in o:
	print(i)


def answer():
	a = int(input())
	while a:
		n = list(input())
		i = 2
		c_out = str(n[0])
		while i < len(n):
			c_out += n[i]
			i += 2
		c_out += n[-1]
		print(c_out)
		a -= 1
answer()


def solve(l):
	for x in l:
		g = list(x)
		i = 0
		while i < len(g) - 1:
			if g[i] == g[i + 1]:
				print(g[i], end='')
				i += 1
			else:
				print(g[i], end='')
			i += 1
		print(g[-1])

def main():
	n = int(input())
	l = list()
	for i in range(n):
		l.append(input())
	solve(l)
main()


n = int(input())
while n:
	n -= 1
	s = input()
	l = list(s)
	k = len(l)
	l2 = []
	l3 = []
	for i in range(k - 1):
		if i not in l3:
			if l[i] == l[i + 1]:
				l2.append(l[i])
				l3.append(i + 1)
			else:
				l2.append(l[i])
	if l[k - 1] == l[k - 2] == l[k - 3] or l[k - 1] != l[k - 2]:
		l2.append(l[k - 1])
		print(''.join(l2))
	else:
		print(''.join(l2))


T = int(input())
while T > 0:
	s = input()
	ans = ''
	ans += s[0]
	for j in range(1, len(s), 2):
		ans = ans + s[j]
	print(ans)
	T -= 1


def fun(s):
	r = s[:2]
	i = 3
	while i < len(s):
		r += s[i]
		i += 2
	return r
n = int(input())
x = []
for i in range(n):
	x.append(input())
for i in range(n):
	print(fun(x[i]))


t = int(input())

def f(b):
	n = len(b)
	if n == 2:
		return b
	else:
		a = str(b[0])
		for i in range(1, n - 1, 2):
			a += b[i]
		a += b[n - 1]
	return a
for _ in range(t):
	b = input()
	print(f(b))


for i in range(int(input())):
	s = list(input())
	t = ''
	n = len(s)
	t += str(s[0])
	i = 1
	while i < n - 1:
		t += str(s[i])
		i += 2
	t += str(s[-1])
	print(t)


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

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

def solve():
	s = input()
	t = s[0] + s[1:len(s) - 1:2] + s[-1]
	print(t)
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


n = int(input())
for i in range(n):
	line = input()
	if len(line) <= 2:
		print(line)
		continue
	output = ''
	output += line[0]
	i = 1
	while i < len(line) - 2:
		output += line[i]
		i += 2
	output += line[len(line) - 1]
	print(output)


def convert(s):
	str1 = ''
	return str1.join(s)
t = int(input())
for i in range(t):
	b = [char for char in input()]
	arr = []
	arr.append(b[0])
	for j in range(1, len(b) - 1, 2):
		arr.append(b[j])
	arr.append(b[-1])
	print(convert(arr))


for _ in range(int(input())):
	l = list(input())
	m = []
	for i in range(len(l)):
		if i % 2 == 0:
			m.append(l[i])
	m.append(l[-1])
	print(''.join(m))


v = int(input())
for i in range(v):
	a = input()
	if len(a) == 2:
		print(a)
		continue
	f = ''
	f += a[0]
	for i in range(1, len(a) - 1, 2):
		f += a[i]
	f += a[len(a) - 1]
	print(f)


d = int(input())
for c in range(d):
	n = input()
	k = n[0]
	for i in range(1, len(n), 2):
		k = k + n[i]
	print(k)


w = int(input())
a = []
for i in range(0, w):
	p = input()
	a.append(p)
for i in range(0, w):
	y = []
	r = list(a[i])
	for j in range(0, len(r), 2):
		t = r[j]
		y.append(t)
	y.append(r[-1])
	print(*y, sep='')


testcases = int(input())
for i in range(testcases):
	b = input()
	temp = b[0]
	j = 1
	while j < len(b) - 2:
		temp += b[j]
		j += 2
	temp += b[-1]
	print(temp)


def foo(b):
	if len(b) == 2:
		return b
	elif len(b) == 4:
		return b[0:2] + b[len(b) - 1]
	else:
		return b[0:2] + foo(b[4:])
t = int(input())
for i in range(t):
	a = input()
	print(foo(a))


try:
	t = int(input())
	for l in range(t):
		s = str(input())
		l = list()
		for i in range(0, len(s) - 2, 2):
			l.append(s[i])
		l.append(s[len(s) - 2:])
		for i in range(len(l)):
			print(l[i], end='')
		print()
except:
	pass


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


def substring(a):
	res = [a[0]]
	for i in range(1, len(a) - 1, 2):
		res.append(a[i])
	res.append(a[-1])
	return res
n = int(input())
for i in range(n):
	a = input()
	print(*substring(a), sep='')


t = int(input())
l = []
for i in range(t):
	x = input()
	l.append(x)
for e in l:
	z = ''
	z = z + e[0]
	m = e[len(e) - 1]
	for j in range(1, len(e) - 1):
		if j % 2 == 0:
			z = z + e[j]
	z = z + m
	print(z)


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
for i in range(n):
	s = insr()
	p = ''
	p = p + s[0]
	s = s[1:]
	while len(s) > 1:
		p = p + s[1]
		s = s[2:]
	p = p + s[0]
	print(p)


for _ in range(int(input())):
	s = list(input())
	res = []
	start = 0
	ss = ''
	for i in range(len(s)):
		ss += s[start]
		start += 1
		if start % 2 == 0:
			res.append(ss)
			ss = ''
	ans = ''
	if len(res) == 1:
		print(*res)
	else:
		for i in range(len(res) - 1):
			if res[i][1] == res[i + 1][0]:
				temp = res[i]
				res[i] = temp[:-1]
		print(str(''.join(res)))


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


for _ in range(int(input())):
	x = input()
	a = []
	c = []
	d = []
	b = len(x)
	for i in x:
		a.append(i)
	for i in range(len(a)):
		if i % 2 == 0:
			d.append(a[i])
	d.append(x[-1])
	print(*d, sep='')


n = int(input())
for i in range(n):
	k = input()
	if len(k) <= 2:
		print(k)
	else:
		start = k[0]
		end = k[-1]
		rest = k[1:-1]
		result = ''
		for j in range(0, len(rest), 2):
			result += rest[j]
		print(start + result + end)


t = int(input())
for s in range(t):
	ans = []
	x = str(input())
	if len(x) < 3:
		print(x)
	else:
		ans.append(x[0])
		for i in range(1, len(x) - 1):
			if i % 2 != 0:
				ans.append(x[i])
			else:
				continue
		ans.append(x[len(x) - 1])
	print(''.join(map(str, ans)))


t = int(input())
for p in range(0, t):
	s = input()
	s1 = ''
	j = 0
	for i in s:
		if j % 2 == 0:
			s1 = s1 + i
		j += 1
	print(s1 + s[-1])


def sol(s):
	l = len(s)
	res = s[:2]
	i = 2
	last = s[1]
	if l == 2:
		return s
	while i < l - 1:
		if last == s[i]:
			res += s[i + 1]
		else:
			res += s[i] + s[i + 1]
		last = s[i + 1]
		i += 2
	return res
tc = int(input())
while tc:
	s = input()
	print(sol(s))
	tc -= 1


for _ in range(int(input())):
	tekst = input()
	print(tekst[0], end='')
	for x in range(1, len(tekst) - 1, 2):
		print(tekst[x], end='')
	print(tekst[-1])


def p(a):
	t = a[0]
	for i in range(1, len(a), 2):
		t += a[i]
	return t
n = int(input())
t = ''
for i in range(n):
	a = input()
	print(p(a))


t = int(input())
for i in range(t):
	s = input()
	n = len(s)
	x = ''
	x += s[0]
	for j in range(1, n - 1, 2):
		x += s[j]
	if n % 2 != 0:
		x += s[-2]
	x += s[-1]
	print(x)


def solve():
	n = int(input())
	for i in range(n):
		b = input()
		ans = b[:2]
		ans = list(ans)
		for j in range(4, len(b) + 1, 2):
			sub = b[j - 2:j]
			ans[-1] = sub[0]
			ans.append(sub[1])
		print(''.join(ans))
solve()


def substring(n):
	for i in range(0, n):
		get_substring = str(input())
		string = []
		string.append(get_substring[0])
		length = int(len(get_substring) / 2)
		count = 1
		for x in range(1, length):
			string.append(get_substring[count])
			count = count + 2
		string.append(get_substring[len(get_substring) - 1])
		print(''.join(map(str, string)))
n = int(input())
substring(n)


t = int(input())
output = []
for i in range(t):
	b = input()
	s = b[0]
	i = 1
	n = len(b)
	while i < n - 1:
		s += b[i]
		i += 2
	s += b[-1]
	output.append(s)
for i in output:
	print(i)


for _ in range(int(input().strip())):
	ans = ''
	s = input().strip()
	for i in range(0, len(s), 2):
		ans += s[i]
	if len(s) % 2 != 0:
		print(ans)
	else:
		print(ans + s[-1])


t = int(input())
for j in range(0, t):
	a = input()
	i = 0
	if len(a) % 2 != 0:
		while i < len(a):
			print(a[i], end='')
			i += 2
	else:
		while i < len(a):
			print(a[i], end='')
			i += 2
		print(a[i - 1])


for _ in range(int(input())):
	k = input()
	ans = ''
	for i in range(0, len(k)):
		if i % 2 == 0:
			ans += k[i]
	ans += k[-1]
	print(ans)


t = int(input())
ans = []
for i in range(t):
	s = input()
	s1 = ''
	for j in range(1, len(s) - 1, 2):
		s1 += s[j] + ' '
	s1 = s1.replace(' ', '')
	ans.append(s[0] + s1 + s[len(s) - 1])
for i in range(t):
	print(ans[i])


no_of_test_cases = input()
no_of_test_cases = int(no_of_test_cases)
for case in range(0, no_of_test_cases):
	input_string = input()
	input_string_length = len(input_string)
	input_string_index = 0
	output_string = ''
	output_string_index = 0
	while input_string_index < input_string_length:
		output_string += input_string[input_string_index]
		output_string_index += 1
		input_string_index += 2
	output_string += input_string[input_string_length - 1]
	print(output_string)


T = int(input())
for i in range(0, T):
	s = input()
	print(s[0], end='')
	for i in range(1, len(s)):
		if i % 2 == 1:
			print(s[i], end='')
	print('')


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


T = int(input())
for i in range(0, T):
	S = str(input())
	l = len(S)
	X = ''
	X = X + S[0]
	j = 1
	while j < l:
		X = X + S[j]
		j += 2
	print(X)


def solve():
	k = input()
	final = k[0]
	for i in range(1, len(k) - 1, 2):
		final += k[i]
	final += k[len(k) - 1]
	print(final)
t = int(input())
for tt in range(0, t):
	solve()


i = int(input())
for x in range(i):
	w = input()
	res = w[:2]
	for el in range(len(w)):
		if el % 2 == 1 and el > 1:
			res += w[el]
	print(res)


n = int(input())
arr = []
for i in range(0, n):
	strochka = list(input())
	rok = ''
	for j in range(len(strochka) - 1, -1, -2):
		if j != 1:
			rok += strochka[j]
		else:
			rok = rok + strochka[j] + strochka[j - 1]
			break
	arr.append(rok[::-1])
for j in range(len(arr)):
	print(arr[j])


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


t = int(input())
while t:
	s = input()
	new = str()
	for i in range(len(s)):
		if i % 2 != 0 or i == 0:
			new += s[i]
	print(new)
	t -= 1


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


n = int(input())
for i in range(n):
	s = input()
	e = []
	if len(s) <= 2:
		print(s)
	else:
		e.append(s[0])
		for i in range(1, len(s) - 1, 2):
			e.append(s[i])
		e.append(s[-1])
		print(''.join(e))


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	b = is1()
	a = ''
	for i in range(0, len(b), 2):
		a += b[i]
	a += b[-1]
	print(a)


from math import gcd

def f():
	s = input()
	res = s[0]
	for n in range(1, len(s), 2):
		res += s[n]
	print(res)
for n in range(int(input())):
	f()


def func(s):
	return f'{s[::2]}{s[-1]}'

def main():
	n = int(input())
	for i in range(n):
		print(func(input()))
main()


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


import math
import os
import random
import re
import sys
n = int(input())
while n > 0:
	n -= 1
	arr = list(input())
	res = []
	ip = True
	for a in arr[1:-1]:
		if ip:
			res.append(a)
			ip = False
		else:
			ip = True
	print(''.join([arr[0]] + res + [arr[-1]]))


t = int(input())
for _ in range(t):
	b = input()
	ans = b[0]
	for char in b[1::2]:
		ans += char
	print(ans)


t = int(input())
for __ in range(t):
	p = input()
	print(p[::2] + p[len(p) - 1])


for i in range(int(input())):
	b = input()
	res = ''
	n = len(b)
	if n == 2:
		print(b)
	else:
		res = b[:2]
		k = 3
		l = 4
		while True:
			res = res + b[k:l]
			if l == n:
				break
			k += 2
			l += 2
		print(res)


t = int(input())
for i in range(t):
	b = str(input())
	if len(b) <= 2:
		s = b
	else:
		s = b[:2]
		b = b[3:]
		j = 0
		while j <= len(b):
			s += b[j]
			j += 2
	print(s)


n = int(input())
a = list()
s = ''
for i in range(n):
	s = input()
	s1 = ''
	for j in range(len(s) - 1):
		if j % 2 == 0:
			s1 = s1 + s[j]
	a.append(s1 + s[-1])
for i in range(n):
	print(a[i])


t = int(input())
l = []
for i in range(t):
	st = str(input())
	l.append(st)
for i in l:
	print(i[0:len(i):2] + i[-1])


for n in [*open(0)][1:]:
	print(n[:-1:2] + n[-2])


try:
	n = int(input())
	i = 0
	while i < n:
		b = input()
		l = len(b)
		a = 1
		s = b[0]
		while a <= l:
			s = s + b[a]
			a += 2
		print(s)
		i += 1
except:
	pass


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


t = int(input())
for _ in range(t):
	df = list(input())
	if len(df) < 3:
		for i in range(len(df)):
			print(df[i], end='')
		print()
	else:
		ans = []
		l = len(df)
		for i in range(l):
			if i % 2 == 0:
				ans.append(df[i])
		if l % 2 == 0:
			ans.append(df[l - 1])
		for i in range(len(ans)):
			print(ans[i], end='')
		print()


for _ in range(int(input())):
	word = list(input())
	output = ''
	for i in range(0, len(word), 2):
		output += word[i]
	print(output + word[-1])


n = int(input())
for _ in range(n):
	s = input()
	k = []
	k.append(s[0])
	for i in range(1, len(s) - 1, 2):
		k.append(s[i])
	k.append(s[-1])
	for e in k:
		print(e, end='')
	print()


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


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


t = int(input())
l = []
for i in range(t):
	s = input()
	if len(s) == 2:
		l.append(s)
	else:
		d = s[0] + s + s[-1]
		r = ''
		for g in range(len(d) // 2):
			r += d[2 * g]
		l.append(r)
for j in l:
	print(j)


def short(arr):
	res = ''
	pointer1 = 0
	pointer2 = 1
	n = len(arr)
	while pointer2 < n - 1:
		res += arr[pointer1]
		pointer1 += 2
		pointer2 += 2
	res += arr[n - 2:n]
	return res
a = int(input())
for i in range(a):
	b = str(input())
	print(short(b))


n = int(input())
for j in range(n):
	s = input()
	ss = s[0]
	for a in range(1, len(s) - 1, 2):
		ss += s[a]
	ss += s[-1]
	print(ss)


def input_string():
	b = input()
	x = 1
	a = b[0]
	for i in range(len(b) // 2):
		a += b[x]
		x += 2
	return a
n = int(input())
c = []
for i in range(n):
	c = input_string()
	for j in range(len(c)):
		print(c[j], end='')
	print()


a = int(input())
for item in range(a):
	s = input()
	lst = list(s)
	if len(s) == 2:
		print(s)
	else:
		lst1 = []
		for i in range(len(s)):
			if i % 2 == 0:
				lst1.append(lst[i])
		lst1.append(lst[-1])
		d = ''
		print(d.join((j for j in lst1)))


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


t = int(input())
while t:
	t -= 1
	n = str(input())
	ans = ''
	for i in range(len(n)):
		if i == 0 or i == len(n) - 1:
			ans += n[i]
		elif i % 2:
			ans += n[i]
		else:
			continue
	print(ans)
	continue


x = int(input(''))
listsub = []
liststring = []
for c in range(x):
	y = input('')
	if len(y) < 4:
		liststring.append(y)
	else:
		for c in range(len(y)):
			listsub.append(y[c])
		for strings in range(2, len(y), 2):
			listsub[strings] = ''
			z = ''.join(map(str, listsub))
		liststring.append(z)
		listsub = []
print(*liststring, sep='\n')


def solve(b: str) -> str:
	return b if len(b) == 2 else b[0] + b[1::2]
tc = int(input())
while tc > 0:
	print(solve(input()))
	tc -= 1


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


T = int(input())
for _ in range(T):
	s = list(input())
	d = []
	d.append(s[0])
	d.append(s[1])
	for i in range(2, len(s)):
		if i % 2 != 0:
			d.append(s[i])
	print(''.join(d))


for i in range(int(input())):
	s = input()
	s1 = ''
	s1 += s[0]
	if len(s) == 2:
		s1 += s[1]
	else:
		k = 1
		for j in range(int(len(s) / 2)):
			s1 += s[k]
			k += 2
	print(s1)


import sys
input = sys.stdin.readline
from math import ceil, floor, factorial

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(10000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	s = input().strip()
	x = len(s)
	ans = []
	for i in range(0, x, 2):
		ans.append(s[i])
	ans += s[x - 1]
	ans = ''.join(ans)
	print(ans)


n = int(input())
for i in range(n):
	s = input()
	ans = ''
	for j in range(0, len(s)):
		if j < 2 or j % 2 == 1:
			ans += s[j]
	print(ans)


import sys
from math import log2, floor
TEST = 0
if TEST == 1:
	input_file = open('inputA.txt', 'r')
	input_from_file = input_file.readlines()

def read_int():
	if TEST:
		return int(input_from_file.pop(0))
	else:
		return int(sys.stdin.readline())

def read_ints():
	if TEST:
		return list(map(int, input_from_file.pop(0).rstrip().split()))
	else:
		return list(map(int, sys.stdin.readline().split()))

def read_str_to_list():
	if TEST:
		in1 = input_from_file.pop(0).rstrip()
	else:
		in1 = sys.stdin.readline().rstrip()
	return [x for x in in1]
t = read_int()
for test in range(t):
	b = read_str_to_list()
	lenb = len(b)
	a = []
	for j in range(int(lenb / 2)):
		a.append(b[2 * j])
	a.append(b[-1])
	print(''.join(a))


for _ in range(int(input())):
	b = list(input())
	p = b[0]
	i = 1
	while i < len(b):
		if i % 2 != 0:
			p += b[i]
		i += 1
	print(p)


def nod(a, b):
	while a != b:
		(a, b) = (max(a, b), min(a, b))
		if a % b == 0:
			a -= (a // b - 1) * b
		else:
			a -= a // b * b
	return a
for i in range(int(input())):
	s = input()
	print(s[0] + ''.join([s[x] for x in range(1, len(s), 2)]))


for _ in range(int(input())):
	ls = input()
	ls1 = ''
	i = 1
	while i < len(ls) - 1:
		if ls[i] != ls[i - 1] and ls[i] == ls[i + 1]:
			ls1 += ls[i - 1]
			i += 2
		else:
			ls1 += ls[i - 1]
			i += 2
	ls1 += ls[len(ls) - 2]
	ls1 += ls[len(ls) - 1]
	print(ls1)


t = int(input())
for i in range(t):
	A = input()
	a = list(map(str, A))
	b = len(a)
	c = (b - 3) // 2 + 1
	d = 1
	for i in range(c):
		d += 1
		del a[d]
	e = ''.join(a)
	print(e)


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


for _ in range(int(input())):
	s = list(input())
	m = [s[0]]
	for i in range(1, len(s), 2):
		m.append(s[i])
	print(''.join(m))


t = int(input())
for _ in range(t):
	s = input().strip()
	ans = ''
	n = len(s) - 2
	ss = s[1:len(s) - 1]
	for i in range(0, n, 2):
		ans += ss[i]
	print(s[0] + ans + s[-1])


from sys import stdin, stdout, setrecursionlimit
from gc import disable
gets = input
puts = print
input = stdin.readline
print = stdout.write

def main() -> int:
	disable()
	for i in range(int(input())):
		s = gets()
		print('%c' % s[0])
		for i in range(1, len(s), 2):
			print('%c' % s[i])
		print('\n')
	return 0
main()


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

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

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

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		s = input()
		st = s[0]
		for i in range(1, len(s) - 1, 2):
			st += s[i]
		st += s[len(s) - 1]
		print(st)
main()


import sys
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))
t = inp()
for _ in range(t):
	s = input()
	print(s[0::2] + s[-1])


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


n = int(input())
ans = str('')
for i in range(n):
	s = input()
	ans = str('')
	if len(s) == 2:
		print(s)
		continue
	ans += s[0]
	ans += s[1]
	for i in range(3, len(s), 2):
		ans += s[i]
	print(ans)


t = int(input())
for _ in range(t):
	s = input()
	for (p, i) in enumerate(s):
		if p == 0:
			print(i, end='')
		elif p == len(s) - 1:
			print(i, end='')
		elif p & 1:
			print(i, end='')
	print()


t = int(input())
for cases in range(t):
	string = input()
	dummy = string[:2]
	for i in range(3, len(string), 2):
		dummy += string[i]
	print(dummy)


for i in range(int(input())):
	s = input()
	l1 = [s[0]]
	for j in range(1, len(s), 2):
		l = s[j:j + 2]
		if len(l) == 1:
			l1.append(l[0])
		elif l[0] == l[1]:
			l1.append(l[0])
	print(''.join(l1))


import math
import os
import random
import re
import sys

def split(word):
	return [char for char in word]

def wordListToFreqDict(wordlist):
	wordfreq = [wordlist.count(p) for p in wordlist]
	return dict(list(zip(wordlist, wordfreq)))

def happyLadybugs(b, n):
	dicti = {}
	l = split(b)
	count = 0
	count1 = 0
	flag = 0
	dicti = wordListToFreqDict(l)
	for x in dicti:
		if x != '_' and dicti[x] >= 2:
			count = count + 1
		if x == '_':
			count1 = count1 + 1
	if count == len(dicti) - 1 and count1 >= 1:
		return 'YES'
	elif count1 < 1:
		for i in range(1, len(l) - 1):
			if l[i] == l[i - 1] or l[i] == l[i + 1]:
				flag = 0
			else:
				flag = 1
				break
		if l[len(l) - 1] != l[len(l) - 2]:
			flag = 1
		if flag == 1:
			return 'NO'
		else:
			return 'YES'
	else:
		return 'NO'

def guessedstring(b, n):
	a = ''
	if n == 2:
		return b
	else:
		l = split(b)
		a = l[0] + l[1]
		for i in range(3, n):
			if i % 2 == 1:
				a = a + l[i]
		return a
g = int(input())
for g_itr in range(g):
	b = input()
	n = len(b)
	result = guessedstring(b, n)
	print(result)


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


q = int(input())
for i in range(q):
	x = str(input())
	try:
		if len(x) < 4:
			print(x)
		else:
			print(x[0], end='')
			i = 1
			while i < len(x) - 2:
				print(x[i], end='')
				i = i + 2
			print(x[-1])
	except:
		print(x, end='')


import sys
infile = sys.stdin
next(infile)
for line in infile:
	b = line
	a = ''
	a = a + b[0]
	for i in range(1, len(b) - 1, 2):
		a += b[i]
	a += b[-1]
	print(a)


t = int(input())
for j in range(t):
	b = input()
	a = ''
	n = len(b)
	i = 0
	while i + 1 <= n:
		a += b[i] + b[i + 1]
		i += 4
	if n % 4 == 0:
		a += b[n - 1]
	print(a)


t = int(input())
while t != 0:
	new_str = ''
	str = list(input())
	new_str = new_str + str[0]
	for i in range(1, len(str) - 1, 2):
		new_str = new_str + str[i]
	new_str = new_str + str[-1]
	print(new_str)
	del new_str
	t -= 1


import sys, math
for __ in range(int(input())):
	s = input()
	for i in range(len(s)):
		if i <= 1:
			print(s[i], end='')
		elif i % 2 != 0:
			print(s[i], end='')
	print()


t = int(input())
for i in range(t):
	s = input()
	l = list(s)
	print(l[0], end='')
	for i in range(1, len(l), 2):
		print(l[i], end='')
	print(end='\n')


def solve():
	word = input()
	size = len(word)
	print(word[0] + word[1:size - 1:2] + word[-1])
tc = int(input())
for i in range(tc):
	solve()


t = int(input())
for i in range(t):
	ch = input()
	L = [ch[j] for j in range(1, len(ch) - 1, 2)]
	ch1 = ch[0]
	for k in L:
		ch1 = ch1 + k
	ch1 = ch1 + ch[len(ch) - 1]
	print(ch1)


k = int(input())
for t in range(k):
	s = input()
	ans = ''
	ans = s[0:2]
	i = 3
	l = len(s)
	while i < l:
		ans += s[i]
		i += 2
	print(ans)


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


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


t = int(input())
while t > 0:
	t -= 1
	a = input()
	if len(a) == 2:
		print(a)
		continue
	b = a[1:len(a) - 1]
	c = ''
	for i in range(0, len(b), 2):
		c = c + b[i]
	d = ''
	d = a[0] + c + a[-1]
	print(d)


import sys
lines = []
for line in sys.stdin:
	if 'Exit' == line.rstrip():
		break
	lines.append(line)
t = int(lines[0])
for i in range(1, t + 1):
	s = lines[i].rstrip()
	ls = []
	for char in s:
		ls.append(char)
	new_str = ''
	n = len(ls)
	for j in range(0, n, 2):
		new_str += ls[j]
	new_str += ls.pop()
	print(new_str)


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	s = st()
	ans = s[:2]
	for i in range(3, len(s), 2):
		ans += s[i]
	print(ans)


def solve():
	b = input()
	if len(b) == 2:
		return b
	a = ''
	i = 0
	while i < len(b):
		a += b[i]
		i += 2
	if len(b) % 2 == 0:
		a += b[-1]
	return a

def main():
	for _ in range(int(input())):
		print(solve())
main()


import sys, math, bisect
from collections import Counter, defaultdict as dd

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def l():
	return list(sp())

def strl():
	return list(strsp())

def sp():
	return map(int, data().split())

def strsp():
	return map(str, data().split())
for _ in range(int(data())):
	s = input()
	a = ''
	i = 0
	while i < len(s) - 1:
		if i == 0:
			a += s[i:i + 2]
			i += 2
		else:
			a += s[i + 1]
			i += 2
	print(a)


for _ in range(int(input())):
	ls = input()
	ls1 = ''
	i = 1
	while i < len(ls) - 1:
		ls1 += ls[i - 1]
		i += 2
	ls1 += ls[len(ls) - 2]
	ls1 += ls[len(ls) - 1]
	print(ls1)


import sys
fast_reader = sys.stdin.readline
fast_writer = sys.stdout.write

def input():
	return fast_reader().strip()

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

def sep_input():
	return map(int, input().split())
for _ in range(int(input())):
	s = input()
	ans1 = s[0]
	ans2 = ''
	ans3 = s[-1]
	s = s[1:-1]
	n = len(s)
	for i in range(0, n, 2):
		ans2 += s[i]
	print(ans1 + ans2 + ans3)


for _ in range(int(input())):
	b = input()
	ans = b[0]
	for q in range(1, len(b) - 1, 2):
		ans += b[q]
	ans += b[-1]
	print(ans)


for x in range(int(input())):
	s = input()
	i = 0
	b = ''
	while i < len(s) - 1:
		b += s[i]
		i += 2
	b += s[len(s) - 1]
	print(b)


def main():
	t = int(input())
	for _ in range(t):
		str = input()
		if len(str) == 2:
			print(str)
		else:
			t = str[::2]
			t += str[-1]
			print(t)
main()


for case in range(int(input())):
	s = input()
	s2 = [s[0]]
	i = 1
	while i < len(s) - 1:
		s2.append(s[i])
		i += 2
	s2.append(s[-1])
	print(''.join(s2))


t = int(input())
for _ in range(t):
	s = [x for x in input()]
	ans = []
	ans.append(s.pop(0))
	last = s.pop()
	for i in range(0, len(s), 2):
		ans.append(s[i])
	ans.append(last)
	print(''.join(ans))


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


def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())
import collections as c

def solve():
	B = listStr()
	ans = ''
	for j in range(len(B)):
		if j == 0 or j % 2 == 1:
			ans += B[j]
	return ans
T = getInt()
for t in range(T):
	ans = solve()
	print(ans)


for _ in range(int(input())):
	s = input()
	l = list()
	le = len(s)
	for i in range(0, le, 2):
		l.append(s[i])
	l.append(s[le - 1])
	for i in l:
		print(i, end='')
	print()


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


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


t = int(input())
for _ in range(t):
	b = input()
	print(b if len(b) <= 2 else b[:2] + ''.join([b[x] for x in range(3, len(b)) if x % 2 == 1]))


cases = int(input())
for x in range(cases):
	sub = input()
	count = len(sub) - 1
	msg = ''
	while True:
		msg += sub[count]
		if count == len(sub) - 1:
			count -= 1
		elif count == 0:
			break
		else:
			count -= 2
	print(msg[::-1])


from sys import stdin, stdout
from collections import defaultdict as dd
from collections import Counter as ctr
import statistics
for t in range(int(input())):
	a = list(input())
	i = 0
	b = []
	n = len(a)
	while i < n:
		b.append(a[i])
		i += 2
	b.append(a.pop())
	print(''.join(b))


import sys
input = sys.stdin.readline

def main():
	for _ in range(int(input())):
		s = input()
		print(s[0], end='')
		for i in range(1, len(s)):
			if i % 2 == 1:
				print(s[i], end='')
		print()
main()


import textwrap as t
for i in range(int(input())):
	n = input()
	if len(n) <= 2:
		print(n)
	else:
		a = t.wrap(n, 2)
		b = ''
		for x in a[:-1]:
			b += x[0]
		print(b + a[-1])


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
for _ in range(inp()):
	b = insr()
	indexes_to_remove = []
	if len(b) == 2:
		print(''.join(b))
	else:
		for idx in range(1, len(b) - 1, 2):
			indexes_to_remove.append(idx)
		for idx in reversed(indexes_to_remove):
			del b[idx]
		print(''.join(b))


from copy import copy

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


t = int(input())
for _ in range(t):
	b = input()
	c = ''
	n = len(b)
	for i in range(0, n, 2):
		if i == 0:
			c += b[i] + b[i + 1]
		else:
			c += b[i + 1]
	print(c)


t = int(input())
for _ in range(t):
	string = input()
	haha = []
	for i in range(0, len(string) - 2, 2):
		haha.append(string[i])
	haha.append(string[-2])
	haha.append(string[-1])
	print(''.join(haha))


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


t = int(input())
for test in range(t):
	b = input()
	a = ''
	a = b[0:2]
	for i in range(3, len(b), 2):
		a += b[i]
	print(a)


import sys
try:
	sys.stdin = open('inputs.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
finally:
	input = sys.stdin.readline
	print = sys.stdout.write
t = int(input())
for _ in range(t):
	b = input().strip()
	a = []
	for i in range(0, len(b), 2):
		a.append(b[i])
	a.append(b[-1])
	a.append('\n')
	print(''.join(a))


n = int(input())
for u in range(n):
	s = input()
	a = s[0]
	b = s[-1]
	q = ''
	for i in range(1, len(s) - 1, 2):
		q = q + s[i]
	print(a + q + b)


T = int(input())
for i in range(T):
	b = list(input())
	print(b[0], end='')
	c = len(b)
	for j in range(c - 2):
		if j % 2 != 0:
			print(b[j], end='')
	print(b[c - 1])


t = int(input())
for idx in range(t):
	line = input().strip()
	print(line[::2] + line[-1])


n = int(input())
for i in range(n):
	c = input()
	for j in range(len(c)):
		if j == len(c) - 1:
			print(c[j], end='')
			c = ''
			print()
			break
		if j % 2 == 0:
			print(c[j], end='')


n = int(input())
while n:
	n = n - 1
	s = input()
	if len(s) == 2:
		print(s)
	else:
		s1 = ''
		i = 0
		while i <= len(s) - 2:
			if s[i] != s[i + 1]:
				s1 += s[i]
				i += 1
			elif s[i] == s[i + 1]:
				s1 += s[i]
				i += 2
		print(s1 + s[len(s) - 1])


import sys
get = sys.stdin.readline
tc = int(get())
for _ in range(tc):
	string = get().rstrip()
	ans = string[0:2]
	i = 3
	while i < len(string):
		ans += string[i]
		i += 2
	print(ans)


import sys
input = lambda : sys.stdin.readline().strip()
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
for _ in range(I()):
	b = input()
	a = b[0]
	i = 1
	while i < len(b) - 1:
		if b[i] == b[i + 1]:
			a += b[i]
			i += 1
		i += 1
	print(a + b[-1])


n = int(input())

def guess(string):
	output = string[0]
	i = 1
	while i < len(string):
		output += string[i]
		i += 2
	return output
while n > 0:
	string = input()
	res = guess(string)
	print(res)
	n -= 1


import sys
import math
import operator as op
from functools import reduce
from bisect import *
from collections import deque

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def read_float_line():
	return [float(v) for v in sys.stdin.readline().split()]

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer / denom

def index(a, x):
	i = bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	return -1

def find_lt(a, x):
	i = bisect_left(a, x)
	if i:
		return i - 1
	return -1

def find_le(a, x):
	i = bisect_right(a, x)
	if i:
		return i - 1
	return -1

def find_gt(a, x):
	i = bisect_right(a, x)
	if i != len(a):
		return i
	return -1

def find_ge(a, x):
	i = bisect_left(a, x)
	if i != len(a):
		return i
	return -1
mod = int(1000000000.0) + 7
mod2 = 998244353
t = read_int()
for i in range(t):
	b = read_line()
	ans = ''
	for i in range(0, len(b), 2):
		ans += b[i]
	ans += b[-1]
	print(ans)


n = int(input())
a = []
for i in range(0, n):
	a.append(input())
for i in range(0, n):
	if len(a[i]) > 2:
		dl = len(a[i]) - 2
		s = a[i]
		print(s[:dl:2] + s[dl:])
	else:
		s = a[i]
		print(s)


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


t = int(input())
for i in range(t):
	a = input()
	l = []
	if len(a) == 1 or len(a) == 2:
		print(a)
	else:
		l.append(a[0])
		l.append(a[1])
		for i in range(3, len(a), 2):
			l.append(a[i])
	s = ''
	for i in l:
		s += i
	print(s)


for y in range(int(input())):
	st = list(input())
	lst = st[0]
	for i in range(1, len(st), 2):
		lst += st[i]
	print(lst)


n = int(input())
for i in range(n):
	x = input()
	ans = x[0]
	cnt = 1
	for j in range(1, len(x) - 1):
		if j % 2:
			ans += x[j]
	ans += x[len(x) - 1]
	print(ans)


from collections import defaultdict as dd
import sys
input = sys.stdin.readline
t = int(input())
while t:
	s = input().split()[0]
	n = len(s)
	res = ''
	nn = n // 2
	i = 0
	j = 1
	lol = 0
	if nn % 2 == 1:
		while i < n and j < n:
			if lol % 2 == 0:
				res += s[i] + s[j]
			lol += 1
			i += 2
			j += 2
	else:
		ls = s[-1]
		s = s[:n - 2]
		n -= 2
		while i < n and j < n:
			if lol % 2 == 0:
				res += s[i] + s[j]
			i += 2
			j += 2
			lol += 1
		res += ls
	print(res)
	t -= 1


def default():
	t = int(input())
	while t:
		t -= 1
		s = input()
		a = '' + s[0]
		s = s[1:]
		while len(s) != 1:
			a = a + s[0]
			s = s[2:]
		a += s
		print(a)
default()


t = int(input())
rpta = []
for i in range(t):
	temp = input()
	temp_1 = ''
	index = 1
	for i in temp:
		if index % 2 != 0 or index == len(temp):
			temp_1 = temp_1 + i
		index = index + 1
	if len(temp) == 2 or len(temp) == 1:
		temp_1 = temp
	rpta.append(temp_1)
for j in range(t):
	print(rpta[j])


t = int(input())
for i in range(t):
	l = list(input())
	l2 = [x for x in range(int(len(l) / 2 + 1))]
	l2[0] = l[0]
	for i in range(1, int(len(l) / 2 + 1)):
		l2[i] = l[i * 2 - 1]
	print(''.join(l2))


from math import *
t = int(input())
for _ in range(t):
	s = list(input())
	n = len(s)
	l = [s[0]]
	for i in range(1, n - 1, 2):
		l.append(s[i])
	l.append(s[n - 1])
	for i in range(len(l)):
		print(l[i], end='')
	print()


t = int(input())
inps = []
outs = []
for x in range(t):
	inps.append(str(input()))
for inp in inps:
	out = inp[0]
	for x in range(len(inp) - 2):
		if x % 2 == 0:
			out += inp[x + 1]
	out += inp[-1]
	print(out)


t = int(input())
for i in range(t):
	st = input()
	siz = len(st)
	ans = ''
	for i in range(0, siz - 1, 2):
		ans += st[i]
	ans += st[siz - 1]
	print(ans)


t = int(input())
l = []
p = []
q = []
for i in range(t):
	b = input()
	l = list(b)
	z = l.count(l[0])
	a = int(len(l) / 2) + 1
	p = []
	c = '*'
	if z != len(l):
		for k in range(1, len(l)):
			if l[k - 1] == l[k]:
				l[k] = c
			else:
				p.append(l[k - 1])
				p.append(l[k])
		q = [j for j in p if j != '*']
		ans = ''.join(q)
		print(ans)
		l.clear()
		p.clear()
		q.clear()
	else:
		for k in range(a):
			p.append(l[k])
		ans = ''.join(p)
		print(ans)
		l.clear()
		p.clear()


from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
if os.path.exists('out.txt'):
	sys.stdout = open('out.txt', 'w')

def input():
	return sys.stdin.readline()

def mapi(arg=0):
	return map(int if arg == 0 else str, input().split())
for _ in range(int(input())):
	a = list(input().strip())
	res = []
	res.append(a[0])
	for i in range(1, len(a) - 1, 2):
		res.append(a[i])
	res.append(a[len(a) - 1])
	print(''.join(res))


def c():
	n = int(input(''))
	for i in range(0, n, 1):
		s = input('')
		t = s[0]
		l = []
		l.append(t)
		for k in range(1, len(s), 2):
			l.append(s[k])
		for j in range(len(l)):
			print(l[j], end='')
		print()
c()


def solve():
	s = input()
	if len(s) <= 2:
		ans = s
	else:
		ans = s[0]
		for i in range(1, len(s), 2):
			ans += s[i]
	print(ans)

def main():
	n = int(input())
	while n:
		solve()
		n -= 1
main()


for i in range(int(input())):
	s = input()
	if len(s) == 2:
		print(s, end='')
	else:
		print(s[:2], end='')
		for c in s[3::2]:
			print(c, end='')
	print()


import sys
import heapq
import random
import collections

def solve(strr):
	console('----- solving ------')
	return strr[0] + strr[1::2]

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
for case_num in range(int(input())):
	strr = input()
	res = solve(strr)
	print(res)


t = int(input())
for i in range(t):
	l = input()
	if len(l) == 2:
		print(l)
	else:
		s1 = l[0]
		s2 = l[1:-1]
		s3 = l[-1]
		s4 = ''
		for i in range(0, len(s2), 2):
			s4 += s2[i]
		print(s1 + s4 + s3)


for _ in range(int(input())):
	s = input('')
	ans = ''
	i = 0
	ok = False
	while i < len(s):
		if i == len(s) - 2:
			ok = True
		ans += s[i] + s[i + 1]
		i += 4
	if ok == False:
		ans += s[-1]
	print(ans)


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	b = input().rstrip()
	a = b[0::2] + b[-1]
	print(a)


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


a = []
t = int(input())
for _ in range(t):
	a.append(input())
for s in a:
	ans = ''
	for ss in range(0, len(s), 2):
		if ss != len(s) - 2:
			ans += s[ss]
		else:
			ans += s[ss:ss + 2]
	print(ans)


def solve():
	ab = input()
	ans = ab[0]
	ans += ''.join(ab[1:-1:2])
	ans += ab[-1]
	print(ans)
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for f in range(t):
	n = input()
	s = n[:2]
	for i in range(3, len(n), 2):
		s = s + n[i]
	print(s)


n = int(input())
for i in range(n):
	string = input()
	pairs = []
	newString = ''
	for i in range(0, len(string) - 1, 2):
		pairs.append(string[i] + '' + string[i + 1])
	for i in range(len(pairs)):
		newString += pairs[i][0]
	newString += pairs[-1][1]
	print(newString)


n = int(input())
for i in range(n):
	t = str(input())
	y = list(t)
	b = y
	for j in range(1, len(y) - 1):
		if b[j] == b[j + 1]:
			b[j + 1] = ''
	print(''.join([str(i) for i in b]))


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


n = int(input())
inpm = []
for i in range(n):
	inpm.append(input())
for i in inpm:
	print(i[0], i[1:len(i) - 1:2], i[-1], sep='')


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


def translation(a):
	i = 2
	while i < len(a):
		a[i] = ''
		i += 2
	return ''.join(a)
t = int(input())
for i in range(t):
	a = list(input())
	print(translation(a))


import sys

def swap(x, y, a):
	temp = a[x]
	a[x] = a[y]
	a[y] = temp
	return a

def solve():
	return None

def main():
	q = []
	for line in sys.stdin.readlines():
		q.append(line)
	for i in range(len(q)):
		q[i] = q[i].rstrip()
	for i in range(1, len(q)):
		s = q[i]
		res = s[0]
		for i in range(1, len(s) - 1):
			if i % 2 == 1:
				res += s[i]
			else:
				continue
		res += s[-1]
		print(res)
main()


t = int(input())
for _ in range(t):
	b = input()
	for x in range(0, len(b), 2):
		print(b[x], end='')
	print(b[len(b) - 1])


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


t = int(input())
for x in range(t):
	b = input()
	thing = b[0]
	for y in range(1, len(b), 2):
		thing += b[y]
	print(thing)


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class SegmentTree1:

	def __init__(self, data, default=9999999, func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] > k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for i in range(int(input())):
	s = input()
	ans = ''
	for j in range(0, len(s), 2):
		ans += s[j]
	if len(s) % 2 == 0:
		ans += s[-1]
	print(ans)


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


def main():
	t = int(input())
	ans = []
	for i in range(t):
		b = input()
		a = ''
		for j in range(0, len(b), 2):
			a += b[j]
		a += b[-1]
		ans.append(a)
	for i in ans:
		print(i)
main()


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	for _ in range(ii()):
		s = si()
		ans = s[0] + s[1]
		n = len(s)
		i = 3
		while i < n:
			ans += s[i]
			i += 2
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for l in range(t):
	strmx = ''
	listx = list(input())
	strmx += listx[0]
	for m in range(len(listx)):
		if m % 2 != 0:
			strmx += listx[m]
	print(strmx)


t = int(input())
for i in range(t):
	line = input()
	length = len(line)
	arc = length / 2
	k = 0
	for i in range(int(arc)):
		print(line[k], end='')
		k += 2
	print(line[int(length - 1)])


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


n = int(input())
for i in range(n):
	s = input()
	if len(s) == 2 or len(s) == 3:
		print(s)
	else:
		l = []
		l.append(s[0])
		for k in range(1, len(s), 2):
			l.append(s[k])
		new = ''
		for u in l:
			new += u
		print(new)


T = int(input())
for i in range(T):
	sub_string = input()
	s = ''
	if len(sub_string) == 2:
		print(sub_string)
	else:
		for i in range(0, len(sub_string)):
			if i % 2 == 0:
				s = s + sub_string[i]
			else:
				continue
		s = s + sub_string[len(sub_string) - 1]
		print(s)


for _ in range(int(input())):
	s = input()
	res = s[:2]
	s = s[2:]
	for i in range(len(s)):
		if i % 2:
			res = res + s[i]
	print(res)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	s = input().strip()
	a = s[0]
	for i in range(1, len(s) - 1, 2):
		a += s[i]
	a += s[-1]
	print(a)


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


t = int(input())
if 1 <= t <= 1000:
	for i in range(t):
		b = input()
		count = b[0]
		if 2 <= len(b) <= 100:
			for i in range(1, len(b), 2):
				count += b[i]
			print(count, end=' ')
			print()
		else:
			print('Длинна строки меньше 2!!!')
else:
	print('Число меньше 1 или больше 1000!')


def main():
	t = int(input())
	for _ in range(t):
		s = input()
		a = ''
		a = s[:2]
		for i in range(3, len(s), 2):
			a += s[i]
		print(a)
	return
main()


try:
	for i in range(int(input())):
		s = input()
		p = ''
		p += s[0]
		for i in range(1, len(s)):
			if i % 2 != 0:
				p += s[i]
		print(p)
except:
	pass


n = int(input())
for i in range(n):
	a = ''
	b = str(input())
	for i in range(0, len(b) - 1, 2):
		if i != len(b) - 2:
			a += b[i]
		elif i == len(b) - 2:
			a += b[i:i + 2]
	print(a)


t = int(input())
for i in range(t):
	s = input()
	p = ''
	if len(s) == 2:
		p = s
	else:
		for j in range(0, len(s), 2):
			p = p + s[j]
		p = p + s[-1]
	print(p)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
while t > 0:
	foo = insr()
	print(''.join(foo[::2]) + foo[-1])
	t -= 1


t = int(input())
for k in range(t):
	b = input()
	sal = ''
	for k in range(0, len(b), 2):
		sal += b[k]
	sal += b[-1]
	print(sal)


def find(s):
	if len(s) == 2:
		return s
	i = 1
	lis = list(s)
	ans = lis[0]
	while i != len(lis) - 1:
		if i % 2 != 0:
			ans = ans + lis[i]
		i += 1
	ans = ans + lis[-1]
	return ans
t = int(input())
while t:
	s = input()
	a = find(s)
	print(a)
	t -= 1


J = lambda : int(input())
for _ in range(J()):
	b = input()
	print(b[0] + b[1:len(b) - 1:2] + b[-1])


t = int(input())
substringStr = []
for i in range(t):
	string = input()
	substringStr.append(string)
for i in range(len(substringStr)):
	ans = ''
	ans += substringStr[i][0]
	x = 1
	while x < len(substringStr[i]):
		ans += substringStr[i][x]
		x += 2
	print(ans)


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


test_cases = int(input())
strb = ''
ans = ''

def solution(str, ans):
	i = 1
	while i < len(str):
		ans = ans + str[i]
		i += 2
	return ans
while test_cases > 0:
	strb = str(input())
	ans = ''
	ans = ans + strb[0]
	print(solution(strb, ans))
	print('\n')
	test_cases = test_cases - 1


tc = int(input())
for _ in range(tc):
	brr = input()
	arr = brr[0:2]
	brr = brr[2:]
	brr = list(map(str, brr))
	for i in range(1, len(brr), 2):
		arr += brr[i]
	print(arr)


def f():
	a = input()
	print(a[0], end='')
	for i in range(1, len(a) - 1, 2):
		print(a[i], end='')
	print(a[len(a) - 1])
for i in range(int(input())):
	f()


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	s = list(stdin.readline())
	x = [s[0]]
	for i in range(2, len(s) - 2):
		if i % 2 == 0:
			x.append(s[i])
	x.append(s[-2])
	ans = ''.join(x)
	stdout.write(ans + '\n')


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


t = int(input())
for i in range(t):
	txt = input()
	leng = len(txt)
	if leng == 2:
		print(txt)
	else:
		txt2 = ''
		for j in range(0, leng, 2):
			txt2 += txt[j]
		if leng % 2 == 0:
			txt2 += txt[len(txt) - 1]
		print(txt2)


t = int(input())
inputs = []
for i in range(t):
	inputs.append(input())
for x in inputs:
	ans = ''
	ans += x[0:-1:2]
	ans += x[-1]
	print(ans)


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


def solve(l):
	n = []
	for i in range(len(l)):
		if i % 2 == 0:
			n.append(l[i])
	n.append(l[len(l) - 1])
	print(''.join(n))
t = int(input())
for i in range(t):
	l = list(input())
	solve(l)


from collections import Counter as count_values
import math

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

def source():
	string = input()
	data = []
	output = ''
	j = 0
	for i in range(2, len(string) + 1, 2):
		data.append(string[j:i])
		j = i
	s = len(data)
	i = 0
	if s == 1:
		return string
	while True:
		if i == s - 1:
			return output + data[i]
		else:
			output = output + data[i][0]
			i += 1
	return output

def main():
	for _ in range(int(input())):
		print(source())
main()


from sys import stdin

def ip():
	return [int(i) for i in stdin.readline().split()]

def sp():
	return [str(i) for i in stdin.readline().split()]

def solve():
	s = str(input())
	if len(s) == 2:
		return s
	ans = ''
	for i in range(0, len(s[1:len(s) - 1]), 2):
		ans += s[i + 1]
	return s[0] + ans + s[-1]
t = int(input())
for _ in range(t):
	print(solve())


t = int(input())
an = []
for i in range(t):
	s = input().strip()
	l = len(s)
	r = s[0]
	for j in range(1, l, 2):
		r = r + s[j]
	if j != l - 1:
		r = r + s[-1]
	an.append(r)
for i in range(t):
	print(an[i])


t = int(input(''))
L = []
for i in range(t):
	L.append(str(input('')))
for item in L:
	if len(item) == 2:
		print(item)
		continue
	print(item[0], end='')
	for j in range(1, len(item) - 1, 2):
		print(item[j], end='')
	print(item[-1])


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


from sys import stdin
t = int(stdin.readline())
for _ in range(t):
	ip = stdin.readline()
	out = []
	out.append(ip[0])
	out.append(ip[1])
	for i in range(2, len(ip)):
		if i % 2 != 0:
			out.append(ip[i])
	print(''.join(out))


test = int(input())
b = list()
for i in range(test):
	stringB = input()
	b.append(stringB)
for i in range(test):
	print(b[i][0:len(b[i]):2] + b[i][-1])


import sys
I = sys.stdin.readline
for _ in range(int(I())):
	s = I().strip()
	i = 0
	ans = ''
	while i < len(s):
		ans += s[i]
		if i == len(s) - 2:
			i += 1
		else:
			i += 2
	print(ans)


q = int(input())
for _ in range(q):
	s = input()
	res = s[0]
	i = 1
	while i < len(s) - 1:
		res += s[i]
		i += 2
	res += s[-1]
	print(res)


n = int(input())
for i in range(n):
	k = input()
	if len(k) == 2:
		print(k)
	else:
		for i in range(0, len(k) - 1, 2):
			print(k[i], end='')
		print(k[-1])


testCase = int(input())
for i in range(testCase):
	s = input()
	print(s[0], end='', sep='')
	ln = len(s)
	for i in range(1, ln, 2):
		print(s[i], end='', sep='')
	print()


def substring(s):
	sub = s[:2]
	rest = s[2:]
	result = sub
	for i in range(1, len(rest), 2):
		result += rest[i]
	return result
n = int(input())
for i in range(n):
	s = input()
	print(substring(s))


t = int(input())
for i in range(t):
	s = input()
	if len(s) <= 2:
		print(s)
		continue
	ans = s[0]
	for x in range(1, len(s) - 1, 2):
		ans = ans + s[x]
	ans = ans + s[-1]
	print(ans)


tc = int(input())
while tc:
	s = input()
	res = ''.join(map(str, [s[i] for i in range(0, len(s), 2)]))
	print(res + s[-1])
	tc -= 1


def split(word):
	return [char for char in word]
t = int(input())
while t:
	letter = input()
	arr = split(letter)
	final = []
	yash = ''
	final.append(arr[0])
	for i in range(1, len(arr) - 1, 2):
		final.append(arr[i])
	final.append(arr[len(arr) - 1])
	for i in final:
		yash += i
	print(yash)
	t -= 1


def a_maker(b):
	a = ''
	if len(b) == 2:
		a = b
	else:
		a += b[:2]
		for i in range(3, len(b), +2):
			a += b[i]
	return a
for i in range(int(input())):
	print(a_maker(input()))


p = int(input())
while p:
	s = str(input())
	x = ''
	for i in range(0, len(s) - 1, 2):
		if i == 0:
			x += s[i:i + 2]
		else:
			x += s[i + 1]
	print(x)
	p -= 1


t = int(input())
for test in range(t):
	b = input()
	List = []
	for k in range(len(b) - 2):
		if k % 2 == 0:
			List.append(b[k])
	List.append(b[len(b) - 2])
	List.append(b[len(b) - 1])
	for j in range(len(List) - 1):
		print(List[j], end='')
	print(List[len(List) - 1])


t = int(input(''))
for i in range(0, t):
	x = input('')
	y = ''
	for j in range(0, len(x), 2):
		y += x[j]
	y += x[len(x) - 1]
	print(y)


t = int(input())
l = []
for i in range(t):
	a = ''
	b = input()
	s = b[::2] + b[-1]
	l.append(s)
for i in l:
	print(i)


for t in range(int(input())):
	str_in = input().strip()
	res = str_in[:2]
	for i in range(3, len(str_in), 2):
		res += str_in[i]
	print(res)


test = int(input())
result = dict()
for i in range(test):
	s = input()
	ans = s[:2]
	l = 3
	while l <= len(s):
		ans = ans + s[l]
		l += 2
	result[i] = ans
for i in range(test):
	print(result[i])


t = int(input())
while t != 0:
	str = input()
	n = len(str)
	i = 0
	str2 = str[0]
	i += 2
	while i <= n - 1:
		str2 += str[i]
		i += 2
	str2 += str[n - 1]
	print(str2)
	t -= 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)


for i in range(int(input())):
	lis = list(input())
	n = len(lis)
	l = []
	l.append(lis[0])
	flag = 0
	for i in range(1, n - 2):
		if flag == 1:
			flag = 0
			continue
		if lis[i] == lis[i + 1]:
			flag = 1
		l.append(lis[i])
	l.append(lis[n - 1])
	print(''.join(l))


def get_base_string(s):
	result = []
	for i in range(1, len(s) - 1, 2):
		result.append(s[i])
	return s[0] + ''.join(result) + s[-1]
for _ in range(int(input())):
	s = input()
	print(get_base_string(s))


import sys
from fractions import gcd
from math import ceil, sqrt, sin, pi, tan
from collections import defaultdict
read = input
import heapq
mi = lambda : map(int, read().split())
li = lambda : list(mi())
cin = lambda : int(read())
for _t in range(cin()):
	s = read()
	ans = s[0]
	for i in range(1, len(s) - 1, 2):
		ans += s[i]
	print(ans + s[-1])


n = int(input())
for i in range(n):
	s = input()
	a = []
	a.append(s[0])
	for i in range(1, len(s) - 1, 2):
		a.append(s[i])
	a.append(s[-1])
	print(''.join(a))


n = int(input())
while n:
	n -= 1
	s = input()
	r = s[::2]
	print(r + s[-1])


t = int(input())
for i in range(t):
	s = input()
	s1 = ''
	for i in range(0, len(s) - 3, 2):
		s1 = s1 + s[i]
	n = len(s) - 2
	s1 = s1 + s[n:]
	print(s1)


t = int(input())
for ii in range(t):
	b = input()
	for i in range(0, len(b) - 1):
		if i % 2 == 0:
			print(b[i], end='')
	print(b[len(b) - 1])


def solv():
	s = str(input())
	l = len(s)
	if l <= 2:
		return s
	elif l % 2 == 0:
		ans = ''
		for i in range(0, l, 2):
			ans += s[i]
		ans += s[len(s) - 1]
		return ans
test = int(input())
while test != 0:
	test -= 1
	print(solv())


for _ in range(int(input())):
	S = input()
	N = len(S)
	Ans = S[0]
	for i in range(1, N - 1, 2):
		Ans += S[i]
	Ans += S[-1]
	print(Ans)


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


import sys
input = sys.stdin.readline

def solve():
	s = input().strip()
	n = len(s)
	(a, b) = (s[0], s[-1])
	s1 = s[1:n - 1]
	ans = ''
	for i in range(0, n - 2, 2):
		ans += s1[i]
	ans = a + ans + b
	print(ans)
tt = int(input())
for test in range(tt):
	solve()


try:
	T = int(input())
	for _ in range(T):
		B_str = input()
		B = list(B_str)
		A = []
		A_str = ''
		temp = []
		first = B[0]
		last = B[len(B) - 1]
		A.append(first)
		if len(B) > 2:
			for i in range(1, len(B) - 1):
				if i % 2 != 0:
					temp.append(B[i])
			for j in temp:
				A.append(j)
			A.append(last)
			print(A_str.join(A))
		else:
			print(B_str)
except EOFError:
	pass


t = int(input())
for _ in range(t):
	b = input()
	tab = []
	ans = ''
	for i in range(1, len(b) + 1, 2):
		tab.append(b[i - 1] + b[i])
	ans += tab[0]
	for i in range(1, len(tab)):
		ans += tab[i][1]
	print(ans)


from sys import stdin

def solve(str):
	out = [str[0]]
	for i in range(1, len(str), 2):
		out.append(str[i])
	print(''.join(out))
for _ in range(int(input())):
	str = stdin.readline()
	solve(str)


for i in range(int(input())):
	st = input()
	if len(st) == 2:
		print(st)
	else:
		s = ''
		j = 0
		while j < len(st) - 1:
			if st[j] == st[j + 1]:
				s += st[j]
				j += 2
			else:
				s += st[j]
				j += 1
		s += st[-1]
		print(s)


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


def solve(string):
	string_a = []
	for i in range(0, len(string), 2):
		string_a.append(string[i])
	if len(string) % 2 == 0:
		string_a.append(string[len(string) - 1])
	return ''.join((str(x) for x in string_a))
n = int(input())
for e in range(n):
	s = str(input())
	print(solve(s))


t = int(input())
for _ in range(t):
	s = input()
	n = len(s)
	st = '' + s[0]
	i = 1
	while i < n - 1:
		if s[i] == s[i + 1]:
			st += s[i]
			i += 1
		else:
			st += s[i]
		i += 1
	print(st + s[n - 1])


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


t = int(input())
k = []
for s in range(t):
	b = input()
	k.append(b)
for n in k:
	n = list(n)
	i = 0
	v = []
	while i < len(n):
		v.append(n[i])
		i += 2
	v.append(n.pop())
	print(''.join(v))


def test_case():
	s = input()
	new_s = ''
	for i in range(0, len(s), 2):
		new_s += s[i]
	new_s += s[len(s) - 1]
	print(new_s)
t = int(input())
while t > 0:
	test_case()
	t -= 1


t = int(input())
while t:
	t -= 1
	n = input()
	k = len(n)
	if k >= 2:
		i = 0
		b = ''
		while i < k:
			b += n[i]
			i += 2
		b += n[-1]
		print(b)
	else:
		print(n)


case = int(input())
out_list = []
for a in range(case):
	word = list(input())
	out_word = []
	out_word.append(word[0])
	for loop in range(1, len(word), 2):
		out_word.append(word[loop])
	out_list.append(out_word)
for outt in out_list:
	print(''.join(outt))


t = int(input())
for k in range(t):
	b = input()
	n = len(b)
	if n == 2:
		print(b)
	else:
		ans = ''
		for i in range(0, n, 2):
			ans += b[i]
		ans += b[-1]
		print(ans)


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
T = 1
T = int(stdin.readline())
for _ in range(T):
	s = str(stdin.readline().strip('\n'))
	ss = ''
	d = {}
	for i in range(1, len(s) - 1, 2):
		ss += s[i]
	print(s[0] + ss + s[-1])


z = input
import math
n = int(input())
p = []
for i in range(n):
	l = z()
	c = ''
	j = 0
	for i in l:
		try:
			c += l[j]
			j += 2
		except:
			pass
	print(c + l[-1])


n = int(input())
for i in range(n):
	code = input()
	decode = ''
	decode = decode + code[0]
	for j in range(len(code)):
		if j != 0 and j % 2 == 1 and (j != len(code) - 1):
			decode = decode + code[j]
		if j == len(code) - 1:
			decode = decode + code[j]
	print(decode)


for _ in range(int(input())):
	s = input()
	for i in s[::2]:
		print(i, end='')
	print(s[-1], end='\n')


t = int(input())
for _ in range(t):
	s = input()
	str = ''
	for i in range(len(s)):
		if i % 2 == 1 or i == 0:
			str = str + s[i]
	print(str)


for _ in range(int(input())):
	s = input()
	x = ''
	c = 0
	for i in s:
		if c:
			x += i
		c = 1 - c
	x = s[0] + x
	print(x)


t = int(input())
while t:
	t = t - 1
	s = input()
	n = len(s)
	if n == 2:
		print(s)
		continue
	out = s[0]
	for i in range(1, n - 2, 2):
		if s[i] == s[i + 1]:
			out += s[i]
	out += s[n - 1]
	print(out)


t = int(input())
u = ''
while t != 0:
	s = input()
	u += s[0]
	n = len(s)
	for letter in range(1, n + 1, 2):
		u += s[letter]
	print(u)
	u = ''
	t -= 1


it = int(input())
for i in range(it):
	pal = input()
	if len(pal) == 2:
		print(pal)
	else:
		a = pal[:2]
		for j in range(3, len(pal), 2):
			a += pal[j]
		print(a)


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])


n = int(input())
for _ in range(n):
	s = input()
	if len(s) == 2:
		print(s)
		next
	else:
		res = ''
		res += s[0]
		for i in range(1, len(s) - 1):
			if i % 2 == 0:
				res += s[i]
		res += s[-1]
		print(res)


def ii():
	return int(input())

def si():
	return input()

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

def iwl():
	return map(int, input().split())
t = ii()
for i in range(t):
	s = si()
	i = 0
	ans = ''
	while i < len(s):
		if i == 0 or i == len(s) - 1:
			ans = ans + s[i]
			i += 1
		else:
			ans = ans + s[i]
			i += 2
	print(ans)


test_cases = int(input())
for _ in range(test_cases):
	s = input()
	out = []
	out += s[0]
	for i in range(1, len(s) - 1, 2):
		out += s[i]
	out += s[-1]
	print(''.join(out))


tc = int(input())
for i in range(0, tc):
	s = input()
	if len(s) <= 2:
		print(s)
	else:
		l = len(s)
		for i in range(0, l - 2, 2):
			print(s[i], end='')
		for i in range(l - 2, l):
			print(s[i], end='')
		print()


number_of_inputs = int(input())
for i in range(number_of_inputs):
	output = ''
	string = input()
	for j in range(0, len(string) - 2, 2):
		output += string[j]
	print(output + string[-2] + string[-1])
	output = ' '


n = int(input())
B = []
for i in range(n):
	b = input()
	B.append(b)
for j in B:
	A = ''
	for i in range(0, len(j), 2):
		A = A + j[i]
	A = A + j[len(j) - 1]
	print(A)


n = int(input())
for i in range(n):
	a = []
	s = input()
	for j in range(len(s)):
		if j == 0 or j == len(s) - 1:
			a.append(s[j])
		elif j > 0 and j < len(s) - 1:
			if j % 2 == 0:
				a.append(s[j])
	print(''.join(a))


test_case = int(input())
while test_case:
	b = input()
	print(b[:-1:2] + b[-1])
	test_case -= 1


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())
for case in range(itg()):
	s = inp()
	ans = s[0]
	for i in range(1, len(s) - 1, 2):
		ans += s[i]
	ans += s[-1]
	print(ans)


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	ans = []
	for _ in range(n):
		s = S()
		k = len(s)
		_ans = ''
		for i in range(k):
			if i % 2 == 0:
				_ans += s[i]
		_ans += s[-1]
		ans.append(_ans)
	for x in ans:
		print(x)
main()


import sys

def ii():
	return sys.stdin.readline().strip()

def idata():
	return [int(x) for x in ii().split()]

def solve_of_problem():
	b = ii()
	ans = b[0]
	for i in range(1, len(b), 2):
		ans += b[i]
	print(ans)
	return
for t in range(int(ii())):
	solve_of_problem()


t = int(input())
for ini in range(t):
	code = input()
	temp = code[1:-1]
	output = code[0]
	for i in range(0, len(temp), 2):
		output += temp[i]
	output += code[-1]
	print(output)


def solve():
	s = input()
	n = len(s)
	ans = ''
	for i in range(n // 2 - 1):
		ans += s[2 * i]
	ans += s[-2] + s[-1]
	print(ans)
	return

def main():
	t = int(input())
	for i in range(t):
		solve()
	return
main()


n = int(input())
for _ in range(n):
	s = input()
	print(s[0], end='')
	for x in range(1, len(s), 2):
		print(s[x], end='')
	print()


t = int(input())
w = []
for i in range(t):
	a = input()
	a = list(a)
	n = len(a)
	t = []
	t.append(a[0])
	t.append(a[1])
	c = 3
	while c <= n:
		t.append(a[c])
		c = c + 2
	b = ''.join([str(elem) for elem in t])
	w.append(b)
for i in w:
	print(i)


t = int(input())
tab = list()
for i in range(t):
	a = input()
	result = str()
	for i in range(0, len(a) - 1, 2):
		result += a[i]
	result += a[-1]
	tab.append(result)
for i in range(len(tab)):
	print(tab[i])


x = int(input())
for i in range(x):
	y = input()
	y = list(y)
	i = 0
	while i < len(y) - 1:
		if y[i] != y[i + 1]:
			print(y[i], end='')
			i = i + 1
		else:
			print(y[i], end='')
			i = i + 2
	print(y[-1])


t = int(input())
while t > 0:
	string = input()
	mystr = ''
	for i in range(2):
		mystr += string[i]
	for i in range(3, len(string)):
		if i % 2 != 0 and i <= len(string):
			mystr += string[i]
	print(mystr)
	t -= 1


for _ in range(int(input())):
	l = list(map(str, input()))
	l.append(0)
	l.append(0)
	k = []
	a = l[0]
	k.append(a)
	a = l[1]
	k.append(a)
	for i in range(0, len(l) - 4, 2):
		a = l[i:i + 2]
		b = l[i + 2:i + 4]
		if a[1] == b[0]:
			k.append(b[1])
	s = ''
	for i in k:
		s += i
	print(s)


for _ in range(int(input())):
	s = input()
	c = ''
	i = 0
	while i != len(s):
		if i % 2 == 0 and i != 0:
			i += 1
		else:
			c += s[i]
			i += 1
	print(c)


test = int(input())
while test:
	st = input()
	if len(st) < 3:
		print(st)
		test -= 1
		continue
	cpst = ''
	cpst += st[0]
	i = 1
	while i < len(st) - 1:
		if st[i] == st[i + 1] or i == len(st) - 1:
			cpst += st[i]
			i += 2
	if len(st) % 2 == 0:
		cpst += st[len(st) - 1]
	print(cpst)
	test -= 1


size = int(input())
ls = []
for i in range(size):
	x = input()
	for i in range(0, len(x), 2):
		ls.append(x[i])
	if len(x) % 2 == 0:
		ls.append(x[-1])
	for i in ls:
		print(i, end='')
	print()
	ls.clear()


t = int(input())
for _ in range(t):
	s = input()
	ans = str()
	for (id, item) in enumerate(s):
		if id % 2 == 0 or id == len(s) - 1:
			ans += item
	print(ans)


from io import open
lista = []
test_number = int(input())
for i in range(0, test_number):
	line = input()
	lista.append(line)
indice = 0
list_words = []
for word in lista:
	word1 = ''
	for (i, c) in enumerate(word):
		if len(word) <= 2:
			word1 = word1 + word[i]
		elif i == 0 or i % 2 != 0:
			word1 = word1 + word[i]
	list_words.append(word1)
for word in list_words:
	print(word)


def solve():
	b = input()
	a = ''
	j = 0
	for i in b:
		if j % 2 == 0 or j == len(b) - 1:
			a = a + i
		j += 1
	print(a)
[solve() for i in range(int(input()))]


t = int(input())
for i in range(t):
	st = input()
	res = ''
	if len(st) == 2:
		res = st
	else:
		res = res + st[0]
		for j in range(1, len(st), 2):
			res = res + st[j]
	print(res)


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


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


t111 = int(input())
for _ in range(t111):
	a = input()
	if len(a) == 2:
		print(a)
	else:
		ans = a[0:2]
		i = 3
		while True:
			ans += a[i]
			i += 2
			if i >= len(a):
				break
		print(ans)


for i in range(int(input())):
	a = input()
	k = len(a)
	if k == 2:
		print(a)
		continue
	else:
		l = a[0]
		for i in range(1, len(a)):
			if i % 2 == 0:
				pass
			else:
				l += a[i]
		print(l)


num = int(input())
lines = []
for i in range(num):
	line = input()
	lines.append(line)
for st in lines:
	ans = ''
	for i in range(len(st)):
		if i % 2 == 0:
			ans += st[i]
	ans += st[-1]
	print(ans)


import os
import sys
from io import BytesIO, IOBase
from collections import Counter as count_values
import math

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

def source():
	string = input()
	data = []
	output = ''
	j = 0
	for i in range(2, len(string) + 1, 2):
		data.append(string[j:i])
		j = i
	s = len(data)
	i = 0
	if s == 1:
		return string
	while True:
		if i == s - 1:
			return output + data[i]
		else:
			output = output + data[i][0]
			i += 1
	return output

def main():
	for _ in range(int(input())):
		print(source())
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


try:
	for _ in range(int(input())):
		s = input()
		a = len(s)
		if a == 2:
			print(s)
		else:
			print(s[0], end='')
			s = s[1:]
			i = 0
			while i < a - 1:
				print(s[i], end='')
				i = i + 2
			print()
except:
	pass


import sys
from os import path
if path.exists('C:/Users/prana/Desktop/sublime/input.txt'):
	sys.stdin = open('C:/Users/prana/Desktop/sublime/input.txt', 'r')
	sys.stdout = open('C:/Users/prana/Desktop/sublime/output.txt', 'w')

def solve():
	s = input()
	if len(s) > 2:
		s = list(s)
		ans = []
		for i in range(len(s)):
			if i == 0 or i == len(s) - 1 or i % 2 != 0:
				ans.append(s[i])
		t = ''
		an = t.join(ans)
		print(an)
	else:
		print(s)
T = 1
T = int(input())
for _ in range(1, T + 1):
	print('Case #', _, file=sys.stderr)
	solve()


test = int(input())
while test != 0:
	a = list(input())
	b = []
	b.append(a[0])
	for x in range(1, len(a)):
		if x % 2 != 0:
			b.append(a[x])
	test -= 1
	print(''.join(map(str, b)))


def solve(s):
	a = ''
	a += s[0]
	a += s[1]
	for i in range(3, len(s), 2):
		a += s[i]
	return str(a)
t = int(input())
for i in range(0, t):
	print(solve(input()))


t = int(input())
for q in range(t):
	palavra = input()
	tamanho = len(palavra)
	a = palavra[0]
	for k in range(1, tamanho):
		if k % 2 == 0 and palavra[k] == palavra[k - 1]:
			continue
		else:
			a += palavra[k]
	print(a)


t = int(input())
while t > 0:
	t -= 1
	b = input()
	a = []
	i = 0
	while i < len(b):
		if i == 0 or i == len(b) - 1:
			a.append(b[i])
			i += 1
		else:
			a.append(b[i])
			i += 2
	print(''.join(a))


import sys
import os
readline = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	s = str(input())
	res = s[0]
	for i in range(1, len(s), 2):
		res += s[i]
	print(res)


t = int(input())
for _ in range(t):
	b = input()
	l = []
	for i in range(0, len(b), 2):
		l.append(b[i])
	l.append(b[len(b) - 1])
	print(''.join(l))


from sys import stdin
tc = int(stdin.readline())
for t in range(tc):
	ns = stdin.readline()
	if len(ns) == 2:
		print(ns)
	else:
		ans = ''
		for x in range(0, len(ns) - 2, 2):
			if x == 0:
				ans += ns[x]
				ans += ns[x + 1]
			else:
				ans += ns[x + 1]
		print(ans)


import sys
sys.setrecursionlimit(10000)
t = int(input())
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)


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


t = int(input())
for i in range(t):
	b = input()
	r = ''
	for j in range(0, len(b), 2):
		k = b[j:j + 2]
		if j == 0:
			r = r + k
		else:
			r = r + k[1]
	print(r)


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import string as st
import heapq

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

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

def main():
	try:
		l = list(input())
		ans = []
		n = len(l)
		for x in range(len(l)):
			if x == 0:
				ans.append(l[x])
			elif x == n - 1:
				ans.append(l[x])
			elif x & 1 == 1:
				ans.append(l[x])
		print(''.join(ans))
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


for lo in range(int(input())):
	st = input()
	n = len(st)
	if n == 2:
		print(st)
		continue
	ans = st[:2]
	for i in range(3, n, 2):
		ans += st[i]
	print(ans)


def eval(S):
	if len(S) <= 2:
		return S
	s = S[0]
	for i in range(1, len(S), 2):
		if i % 2 != 0:
			s += S[i]
	return s
for _ in range(int(input())):
	S = input()
	print(eval(S))


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


import math
n = int(input())
for _ in range(n):
	s = list(input())
	l = {}
	i = 1
	while i < len(s) - 1:
		if s[i] == s[i + 1]:
			l[i] = 1
			i = i + 1
		i = i + 1
	a = ''
	for i in range(len(s)):
		if i not in l:
			a = a + s[i]
	print(a)


for _ in range(int(input())):
	a = list(input())
	n = len(a)
	ans = a[0]
	i = 1
	while i < n - 1:
		ans += a[i]
		i += 2
	ans += a[n - 1]
	print(ans)


n = int(input())
fs = ''
for i in range(n):
	str = input()
	fs += str[0]
	fs += str[1::2]
	print(fs)
	fs = ''


def solve(s):
	n = len(s)
	track = []
	track.append(s[:2])
	i = 3
	while i < n:
		track.append(s[i])
		i += 2
	print(''.join(map(str, track)))
t = int(input())
for _ in range(t):
	s = input()
	solve(s)


n = int(input(''))
for i in range(n):
	s = input('')
	final = s[0:2]
	for w in range(3, len(s), 2):
		final = final + s[w]
	print(final)


t = int(input())
for caseNr in range(1, t + 1):
	x = str(input())
	if len(x) == 2:
		print(x)
	else:
		ans = x[0]
		for i in range(1, len(x) - 1):
			if i % 2 != 0:
				ans += x[i]
			else:
				continue
		ans += x[-1]
		print(ans)


t = int(input())
l = []
for j in range(0, t):
	s = input()
	l.append(s)
for k in range(0, t):
	s1 = ''
	n = len(l[k])
	for i in range(0, n):
		if i % 2 == 0:
			s1 = s1 + l[k][i]
		elif i == n - 2 or i == n - 1:
			s1 = s1 + l[k][i]
	print(s1)


def read_int():
	return int(input())

def read_string_array():
	for s in input().split():
		yield s

def read_int_array():
	for s in read_string_array():
		yield int(s)

def read_line():
	return input()

def solve(s):
	ret = ''
	for i in range(len(s)):
		if not i % 2 or i == len(s) - 1:
			ret += s[i]
	return ret
T = read_int()
for _ in range(T):
	S = read_line()
	print(solve(S))


n = int(input())
i = 0
while i < n:
	str = input()
	firstChar = str[0]
	lastChar = str[-1]
	finalStr = ''
	str = str[1:-1]
	finalStr += firstChar
	j = 0
	while j < len(str):
		finalStr += str[j]
		j += 2
	finalStr += lastChar
	print(finalStr)
	i += 1


t = int(input())
for i in range(t):
	b = list(input())
	j = 2
	while j < len(b):
		b.pop(j)
		j = j + 1
	for x in b:
		print(x, end='')
	print()


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


import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
n = int(input())
for zzz in range(n):
	s = input()
	l = len(s)
	b = []
	for i in range(0, l, 2):
		b.append(s[i])
	b.append(s[-1])
	print(''.join(b))


n = int(input())
for i in range(n):
	sIn = input()
	if len(sIn) == 2:
		print(sIn)
	else:
		sOut = ''
		i = 0
		while i < len(sIn):
			sOut = sOut + sIn[i]
			i = i + 2
		sOut = sOut + sIn[len(sIn) - 1]
		print(sOut)


a = int(input())
for i in range(a):
	n = input().strip()
	print(n[0], end='')
	for i in range(1, len(n), 2):
		print(n[i], end='')
	print()


import math
from collections import defaultdict, Counter

def solve():
	s = str(input())
	ans = s[0]
	for i in range(1, len(s) - 1, 2):
		ans += s[i]
	ans += s[-1]
	print(ans)

def main():
	t = int(input())
	test_case_num = 1
	while test_case_num <= t:
		solve()
		test_case_num += 1
main()


import math

def isPowerOfTwo(x):
	return x and (not x & x - 1)
t = int(input())
for i in range(t):
	b = input()
	a = ''
	for j in range(0, len(b), 2):
		a = a + b[j]
	print(a + b[len(b) - 1])


t = int(input())
res = []
for i in range(t):
	b = input()
	if len(b) <= 2:
		res.append(b)
	else:
		i = 2
		n = len(b)
		a = b[:2]
		while i < n:
			a = a + b[i + 1]
			i += 2
		res.append(a)
for a in res:
	print(a)


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


from sys import stdin, stdout

def II():
	return int(stdin.readline())

def SI():
	return stdin.readline()[:-1]
t = II()
for _ in range(t):
	b = SI()
	n = len(b)
	ans = ''
	for (i, c) in enumerate(b):
		if i == 0 or i == n - 1 or i % 2 == 0:
			ans += c
	stdout.write(str(ans) + '\n')


k = int(input())
for i in range(k):
	s = input()
	result = s[:2]
	for pos in range(0, len(s) - 2, 2):
		result += s[pos + 3]
	print(result)


n = int(input())

class solution:

	def __init__(self):
		self.__sol = []

	def add(self, cuvant):
		cuv = ''
		k = 0
		for i in cuvant:
			if k == 0:
				cuv += i
			elif k == 1:
				cuv += i
			elif k % 2 == 1:
				cuv += i
			k += 1
		self.__sol.append(cuv)

	def afis(self):
		for i in self.__sol:
			print(i)
sol = solution()
while n:
	cuvant = input()
	sol.add(cuvant)
	n -= 1
sol.afis()


test_cases = int(input())
for i in range(test_cases):
	word = input()
	starting_letter = word[0]
	ending_letter = word[-1]
	doubles = word[1:-1]
	singles = ''.join([doubles[i] for i in range(len(doubles)) if i % 2 == 0])
	print(starting_letter + singles + ending_letter)


t = int(input())
while t:
	s = input()
	s1 = ''
	s1 += s[0]
	i = 1
	while i < len(s):
		if i % 2 == 1:
			s1 += s[i]
			i += 1
		else:
			i += 1
	print(s1)
	t -= 1


t = int(input())
while t > 0:
	s = input()
	print(s[0], s[1], sep='', end='')
	for i in range(3, len(s), 2):
		print(s[i], end='')
	print()
	t -= 1


def combineString(strg):
	if len(strg) == 2:
		return strg
	arr = list(strg)
	i = 0
	rtn = ''
	while i < len(strg):
		if i == 0:
			rtn = arr[i]
			i += 1
		elif i + 1 == len(strg):
			rtn += arr[i]
			i += 1
		elif arr[i] == arr[i + 1]:
			rtn += arr[i]
			i += 2
	return rtn
t = int(input())
for t_itr in range(t):
	n = input()
	strg = n
	result = combineString(strg)
	print(result)


n = int(input())
for i in range(n):
	k = list(input())
	lst = []
	i = 0
	while i < len(k):
		if i == 0:
			lst.append(k[i])
			i += 1
		elif i == len(k) - 1:
			lst.append(k[i])
			break
		elif k[i + 1] == k[i]:
			lst.append(k[i])
			i += 2
		else:
			lst.append(k[i])
			i += 1
	c = ''.join(lst)
	print(c)


for iota in range(int(input())):
	string = input()
	a = ''
	for i in range(0, len(string), 2):
		a += string[i]
	a += string[-1]
	print(a)


n = int(input())
for i in range(n):
	s = input()
	a = s[0:2]
	b = s[3:len(s):2]
	res = a + b
	print(res)


t = int(input())
for i in range(t):
	a = input()
	l = list(a)
	final = ''
	for i in range(len(a)):
		if i % 2 == 0 or i == len(a) - 1:
			final += l[i]
	print(final)


import sys
input = iter(sys.stdin.read().splitlines()).__next__
sys.setrecursionlimit(10000)
TC = int(input())
for tc in range(TC):
	b = input().strip()
	res = b[0]
	for i in range(1, len(b), 2):
		res += b[i]
	print(res)


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	b = input()
	ans = b[0]
	tmp = b[-1]
	b = b[1:]
	b = b[:-1]
	for i in range(len(b)):
		if i % 2 == 0:
			ans += b[i]
	print(ans + tmp)


tests = int(input())
for t in range(tests):
	b = input()
	r = ''
	for i in range(0, len(b), 2):
		r += b[i]
	r += b[-1]
	print(r)


t = int(input())
for _ in range(t):
	l = list()
	s = input()
	n = len(s)
	if len(s) <= 2:
		print(s)
		continue
	l.append(s[0])
	l.append(s[1])
	for i in range(3, n, 2):
		l.append(s[i])
	print(''.join(l))


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


n = int(input())
c = 0
while c < n:
	i = str()
	s = input()
	k = 0
	for l in s:
		if k >= len(s) - 2:
			continue
		i = i + s[k]
		k = k + 2
	print(i + s[len(s) - 2:])
	c = c + 1


import math
t = int(input())
for w in range(t):
	b = input()
	a = b[0] + b[1]
	k = len(b)
	for i in range(3, k, 2):
		a += b[i]
	print(a)


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


t = int(input())
answers = []
for case in range(t):
	b = list(input())
	a = ''
	for i in range(len(b) // 2):
		a += b[2 * i]
	a += b[-1]
	answers.append(a)
for answer in answers:
	print(answer)


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


T = int(input())
while T > 0:
	s = input()
	print(s[0:2], end='')
	for i in range(3, len(s), 2):
		print(s[i], end='')
	print()
	T -= 1


from collections import Counter
import sys
import math
for _ in range(int(input())):
	s = input()
	s1 = ''
	for i in range(len(s)):
		if i % 2 != 0 or i == 0:
			s1 = s1 + s[i]
	print(s1)


t = int(input())
for i in range(t):
	a = input()
	b = len(a)
	rs = ''
	for e in range(0, b):
		if e % 2 == 0:
			rs = rs + a[e]
	rs = rs + a[-1]
	print(rs)


t = int(input())
while t > 0:
	s = input()
	s1 = ''
	s1 += s[0]
	n = len(s)
	if n > 2:
		for i in range(1, n - 1, 2):
			s1 += s[i]
	s1 += s[-1]
	print(s1)
	t -= 1


for i in range(int(input())):
	a = input()
	b = a[-1]
	c = a[0]
	a = a[1:-1]
	s = ''
	for j in range(0, len(a), 2):
		s = s + a[j]
	print(c + s + b)


def solve():
	ans = []
	ans.append(string[0])
	for i in range(1, len(string), 2):
		ans.append(string[i])
	return ''.join(ans)
testcases = int(input())
for i in range(testcases):
	string = input()
	print(solve())


t = int(int(input('')))
while t > 0:
	a = list(input(''))
	n = len(a) - 1
	i = 0
	ans = ''
	while i < n - 1:
		if i % 2 == 0:
			x = a.pop(0)
			ans += x
		else:
			a.pop(0)
		i += 1
	ans += a[0] + a[1]
	print(ans)
	t -= 1


n = int(input())
while n > 0:
	n -= 1
	s = input()
	ans = s[0] + s[1]
	i = 3
	while i < len(s):
		ans += s[i]
		i += 2
	print(ans)


t = int(input())
for _ in range(t):
	s = input()
	n = len(s)
	if n <= 2:
		print(s)
	else:
		s = s[0:n:2] + s[n - 1]
		print(s)


for _ in range(int(input())):
	x = str(input())
	a = []
	n = len(x)
	i = 0
	while i < n - 1:
		if x[i] != x[i + 1]:
			a.append(x[i])
			i += 1
		else:
			a.append(x[i])
			i += 2
	a.append(x[-1])
	for i in a:
		print(i, end='')
	print()


cases = int(input())
for i in range(cases):
	string = input()
	s = len(string)
	for j in range(s - 2):
		if j % 2 == 0:
			print(string[j], end='')
		else:
			continue
	print(string[s - 2], string[s - 1], sep='')


for _ in range(int(input())):
	q = str(input())
	print(q[0], end='')
	y = -1
	while y < len(q) - 2:
		y += 2
		print(q[y], end='')
	print()


Answers = []
for i in range(int(input())):
	X = input()
	Answers.append(X[0] + X[1:-1:2] + X[-1])
print('\n'.join(Answers))


t = int(input())
for i in range(t):
	a = str(input())
	d = []
	s = ''
	k = []
	for j in range(len(a)):
		d.append(a[j])
	for z in range(len(d)):
		if z % 2 == 0:
			k.append(d[z])
	s = s.join(k) + a[-1]
	print(s)


t = int(input())
for t1 in range(0, t):
	s = input()
	ans = ''
	if len(s) == 1 or len(s) == 2:
		print(s)
	else:
		ans = s[0]
		ans = ans + s[1]
		i = 3
		while i < len(s):
			ans = ans + s[i]
			i = i + 2
		print(ans)


t = int(input())
while t:
	b = input()
	stack = ''
	a = ''
	stack += b[0]
	for i in range(0, len(b)):
		if len(stack) == 0 or b[i] != stack[-1]:
			stack += b[i]
		elif b[i] == stack[-1]:
			a += stack
			stack = ''
	a += stack
	print(a)
	t -= 1


def short_substring(string):
	string_a = string[:2]
	for i in range(3, len(string), 2):
		string_a = string_a + string[i]
	return string_a
t = int(input())
for i in range(0, t):
	print(short_substring(input()))


from itertools import groupby
for _ in range(int(input())):
	s = input()
	n = len(s)
	if n == 2:
		print(s)
	else:
		b = s[n - 1:]
		t = s[:1]
		for i in range(1, n - 1, 2):
			t += s[i]
		print(t + b)


T = int(input())
for i in range(T):
	b = input()
	tv = len(b) - 2
	result = ''
	for j in range(0, len(b), 2):
		result = result + b[j]
	result = result + b[-1]
	print(result)


t = int(input())
for testcase in range(t):
	str = input()
	s = ''
	n = len(str)
	if len(str) == 2:
		print(str, '\n')
	else:
		for i in range(0, n, +2):
			s += str[i]
		print(s + str[n - 1], '\n')


for _ in range(int(input())):
	b = input()
	for idx in range(len(b)):
		if idx > 1 and idx % 2 == 0:
			continue
		print(b[idx], end='')
	print('')


t = int(input())
ans = []
for j in range(t):
	s = ' '.join(input()).split()
	(f, l, sn) = (s.pop(0), s.pop(-1), '')
	for i in range(0, len(s), 2):
		sn += s[i]
	ans.append(f + sn + l)
for i in ans:
	print(i)


t = int(input())
while t > 0:
	a = list(input())
	s = '' + a[0]
	p = a[-1]
	for i in range(1, len(a) - 2, 2):
		s = s + a[i]
	s = s + p
	print(s)
	t = t - 1


t = int(input())
while t > 0:
	inp = str(input())
	out = []
	out.append(inp[0])
	lenth = len(inp)
	for i in range(1, lenth - 1):
		if i % 2 == 1:
			out.append(inp[i])
	out.append(inp[lenth - 1])
	for i in range(len(out)):
		print(out[i], end='')
	print()
	t -= 1


from sys import stdin, stdout
import math, queue, heapq
fastinput = stdin.readline
fastout = stdout.write
t = int(fastinput())
while t:
	t -= 1
	s = input()
	if len(s) == 2:
		print(s)
	else:
		result = ''
		for i in range(1, len(s) - 1, 2):
			result += s[i]
		print(s[0] + result + s[-1])


testcase = int(input())
while testcase > 0:
	s = input()
	ns = s[0]
	for i in range(1, len(s)):
		if i % 2 != 0:
			ns = ns + s[i]
	print(ns)
	testcase -= 1


import math
t = int(input())
for i in range(t):
	p = input()
	q = ''
	if len(p) > 2:
		x = 2
		q = math.floor(len(p) / 2)
		res = [p[y - x:y] for y in range(x, len(p) + x, x)]
		res = res[:q]
		for j in range(1, len(res)):
			res[j] = res[j][1:]
		res = ''.join(map(str, res))
		print(res)
	else:
		print(p)


t = int(input())
l = []
for i in range(0, t):
	b = input()
	a = b[0:2]
	i = 3
	while i < len(b):
		a += b[i]
		i = i + 2
	l.append(a)
for ele in l:
	print(ele)


c = int(input())
a = str('')
z = str('')
for i in range(0, c):
	b = input()
	l = len(b)
	if l % 2 == 0:
		for x in b[0:l - 1:2]:
			z += x
		a += z + b[-1]
		print(a)
		a = ''
		z = ''
	if l % 2 != 0:
		for w in b[0:l - 1:2]:
			a = a + x
		print(a)
		a = ''


from itertools import zip_longest
for i in range(int(input())):
	a = input()
	b = list(a[1:-1])
	args = [iter(b)] * 2
	z = zip_longest(*args)
	st = a[0]
	for i in z:
		st += i[0]
	st += a[-1]
	print(st)


def ans(s):
	start = s[0]
	out = start
	end = s[-1]
	index = 1
	while index < len(s) - 1:
		out = out + s[index]
		index += 2
	return out + end
m = int(input())
for i in range(m):
	s = input()
	print(ans(s))


def ss(l):
	if len(l) <= 2:
		print(*l, sep='')
	else:
		s = ''
		for i in range(len(l)):
			if i % 2 == 0:
				s = s + l[i]
		s = s + l[len(l) - 1]
		print(s)
	return
n = int(input())
for i in range(n):
	s = input()
	l = list(s)
	ss(l)


import sys
import math
from sys import stdin, stdout

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

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

def get_string():
	return sys.stdin.readline().strip()

def main():
	for t in range(int(input())):
		s = input()
		n = len(s)
		i = 0
		d = ''
		while i + 1 < n:
			if i == 0:
				d = d + s[i] + s[i + 1]
				i += 2
			else:
				d = d + s[i + 1]
				i += 2
		print(d)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
n = list()
for i in range(t):
	n.append(str(input()))
for i in range(t):
	if len(n[i]) == 2:
		print(n[i])
	elif len(set(n[i])) == 1:
		letters = len(n[i]) // 2 + 1
		print(n[i][0] * letters)
	else:
		newstr = n[i][0]
		for j in range(1, len(n[i]), 2):
			newstr += n[i][j]
		print(newstr)


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


try:
	t = int(input())
	for i in range(t):
		s = input()
		l = []
		l.append(s[0])
		a = len(s)
		for j in range(1, a - 1, 2):
			l.append(s[j])
		l.append(s[a - 1])
		str1 = ''.join(l)
		print(str1)
except:
	pass


import re
t = int(input())
for _ in range(t):
	a = list(input())
	fl = [a[0], a[-1]]
	del a[0]
	del a[-1]
	k = 2
	del a[k - 1::k]
	a = str(a)
	print(re.sub("[\\[\\] ,']", '', fl[0] + a + fl[1]))


t = int(input())
while t > 0:
	n = input()
	print(n[::2] + n[-1])
	t -= 1


import atexit
import io
import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	b = input()
	a = b[0]
	for j in range(1, len(b), 2):
		a += b[j]
	print(a)


n = int(input())
for i in range(n):
	str = input()
	ans = ''
	if len(str) == 2:
		print(str)
	else:
		for i in range(len(str) - 2):
			if i % 2 == 0:
				ans = ans + str[i]
		ans = ans + str[len(str) - 2:len(str)]
		print(ans)


t = int(input())
while t:
	t -= 1
	s = input()
	n = len(s)
	x = ''
	x = x + s[0] + s[1]
	for i in range(3, n, 2):
		x += s[i]
	print(x)


import collections
for i in range(int(input())):
	b = collections.deque(input())
	b = list(b)
	f = []
	for i in range(0, len(b)):
		if i % 2 == 0:
			f.append(b[i])
		elif i + 1 - len(b) == 0:
			f.append(b[-1])
	print(''.join(f))


t = int(input())
for i in range(0, t):
	l = []
	l.append(input())
	if len(l[0]) == 1:
		print(l[0])
	elif len(l[0]) == 2:
		print(l[0])
	else:
		for j in range(0, len(l[0]) - 1, 2):
			print(l[0][j], end='')
		print(l[0][-1], end='')
		print(end='\n')


q = int(input())
while q > 0:
	b = list(input())
	i = 1
	while i < len(b) - 1:
		if len(b) == 2:
			print(''.join(b))
		elif b[i] == b[i + 1]:
			del b[i]
			i += 1
	print(''.join(b))
	q -= 1


import sys
input = sys.stdin.readline
testcases = int(input())

def insr():
	s = input()
	return list(s[:len(s) - 1])
for _ in range(testcases):
	bob = insr()
	res = []
	for i in range(0, len(bob), 2):
		res.append(bob[i])
	res.append(bob[-1])
	print(''.join(res))


a = int(input())
for i in range(a):
	d = []
	b = input()
	t = len(b)
	s = b[0]
	for j in range(1, t - 1, 2):
		if b[j] == b[j + 1]:
			d.append(b[j])
	e = ''.join(d)
	print(b[0] + e + b[t - 1])


for i in range(int(input())):
	b = input()
	c = b[0]
	d = b[len(b) - 1]
	a = ''
	a = b[1:len(b) - 1:2]
	a = c + a + d
	print(a)


x = int(input())
z = [0 for i in range(x)]
for y in range(0, x):
	z[y] = str(input())
for y in range(0, x):
	a = z[y]
	u = int(len(a) / 2)
	f = [0 for i in range(u + 1)]
	f[0] = a[0]
	for q in range(0, u):
		f[q] = a[q * 2]
	f[len(f) - 1] = a[len(a) - 1]
	z[y] = f
for y in range(0, x):
	delimiter = ''
	output = delimiter.join(z[y])
	print(output)


for _ in range(int(input())):
	line = input()
	print(line[0] + line[1::2])


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


a = int(input())
for i in range(a):
	n = input()
	m = list()
	for j in range(0, len(n) - 1, 2):
		m.append(n[j])
	m.append(n[len(n) - 1])
	print(''.join(m))


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


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


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


t = int(input())
for i in range(t):
	bstr = input()
	blist = list(bstr)
	lb = len(blist)
	if lb < 3:
		print(bstr)
	else:
		r = [blist[0]]
		for i in range(1, lb):
			if blist[i] != r[-1]:
				r.append(blist[i])
			elif i == lb - 1:
				r.append(blist[i])
			else:
				r.append('')
		print(''.join(r))


n = int(input())
for i in range(n):
	s = input()
	t = [s[0]]
	for j in range(1, len(s), 2):
		t.append(s[j])
	print(''.join(t))


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	s = input()
	s1 = ''
	for i in range(1, len(s) - 1, 2):
		s1 += s[i]
	print(s[0] + s1 + s[-1])


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


test_cases = int(input())
for i in range(test_cases):
	word = input()
	lst = [i for i in word]
	leng = len(lst)
	if len(lst) % 2 == 0:
		for x in range(leng - 2, 1, -2):
			if lst[x - 1] == lst[x]:
				lst.pop(x)
		print(''.join(lst))
	else:
		for x in range(leng - 2, 1, -1):
			if lst[x - 1] == lst[x]:
				lst.pop(x)
		print(''.join(lst))


t = int(input())
answers = []
for i in range(t):
	string = input()
	answers.append(string[::2] + string[-1])
	print(answers[i])


n = int(input())
for i in range(n):
	a = str(input())
	p = a[1]
	rez = a[0]
	t = 0
	for i in range(2, len(a) - 1):
		if p == a[i] and t == 0:
			rez += p
			t = 1
		else:
			t = 0
		p = a[i]
	rez += a[len(a) - 1]
	print(rez)


def main():
	t = int(input())
	for _ in range(t):
		b = input()
		ret = ''
		for i in range(0, len(b), 2):
			ret += b[i]
		ret += b[-1]
		print(ret)
main()


import sys
for _ in range(int(sys.stdin.readline().rstrip())):
	b = sys.stdin.readline().rstrip()
	re = b[:2]
	i = 3
	while True:
		if i >= len(b):
			break
		re += b[i]
		i += 2
	print(re)


n = int(input())
for j in range(n):
	a = input()
	b = a[0:2]
	s = a[3:len(a):2]
	t = b + s
	print(t)


from math import ceil
for _ in range(int(input())):
	s = input()
	n = len(s)
	if n == 2:
		print(s)
	else:
		s1 = ''
		for i in range(0, n, 2):
			s1 = s1 + s[i]
		s1 = s1 + s[-1]
		print(s1)


t = int(input())
for _ in range(t):
	b = input()
	l = len(b)
	if l == 2:
		print(b)
		continue
	print(b[0] + ''.join([b[i] for i in range(l) if i % 2 == 1 and i != l - 1]) + b[-1])


def string(s):
	if len(s) == 0:
		return ''
	c = ''
	for i in range(0, len(s), 2):
		c += s[i]
	return c
t = int(input())
for _ in range(t):
	s = input()
	c = s[0] + string(s[1:len(s) - 1]) + s[-1]
	print(c)


from sys import stdin, stdout
from sys import maxsize

def solve(s):
	an = ''
	for i in range(0, len(s), 2):
		an += s[i]
	an += s[-1]
	print(an)
	pass
test = 1
test = int(input())
for t in range(0, test):
	s = list(input())
	ans = solve(s)


n = int(input())
i = 0
while i < n:
	a = input()
	e = 0
	z = []
	s = len(a) - 1
	while e < len(a) - 1:
		if a[e] == a[e + 1]:
			z.append(a[e])
			e = e + 1
		else:
			z.append(a[e])
		e = e + 1
	z = ''.join(z)
	z = str(z) + str(a[s])
	print(z)
	i = i + 1


t = int(input())
while t != 0:
	b = input()
	l = len(b)
	a = b[0]
	i = 1
	while i <= l - 1:
		a = a + b[i]
		i = i + 2
	print(a)
	t = t - 1


DEBUG_ON = 0
MOD = 998244353

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

def main():
	T = read_int()
	for i in range(T):
		solve()

def dbg(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

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

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b, a % b)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


n = int(input())
for i in range(n):
	s = str(input())
	lis = list(s)
	for j in range(1, len(lis)):
		if j % 2 == 0:
			lis[j] = None
	res = ''
	for j in lis:
		if j != None:
			res += j
	print(res)


n = int(input())
for k in range(n):
	s = input()
	arr = []
	arr = list(s[0:2])
	for i in range(3, len(s), 2):
		arr.append(s[i])
	print(*arr, sep='')


def shortSubstring(b):
	if len(b) % 2 == 0:
		a = [b[i] for i in range(0, len(b) - 1, 2)]
		a.append(b[len(b) - 1])
	else:
		a = [b[i] for i in range(0, len(b), 2)]
	return ''.join(a)
for i in range(int(input())):
	b = input()
	print(shortSubstring(b))


i = int(input())
while i > 0:
	i -= 1
	flag = 0
	s = input()
	for (index, c) in enumerate(s):
		if index == 0:
			ans = c
		elif index == len(s) - 1:
			ans += c
		else:
			if flag % 2 == 1:
				ans += c
			flag += 1
	print(ans)


def shortSubStrings():
	n = int(input())
	l = []
	for i in range(n):
		string = input()
		if len(string) <= 2:
			l.append(string)
		else:
			l.append(string[::2] + string[-1])
	for i in l:
		print(i)
shortSubStrings()


t = int(input())
for x in range(t):
	given = input()
	(i, res) = (0, '')
	while i < len(given) - 1:
		res = res + given[i]
		i += 2
	print(res + given[-1])


def ShortSubstrings(b):
	if len(b) > 2:
		for i in range(2, len(b)):
			b = b[:i] + b[i + 1:len(b)]
	return b
Lista = []
total = int(input())
for i in range(total):
	Lista.append(str(input()))
for j in Lista:
	print(ShortSubstrings(j))


def stri(k):
	y = ''
	for i in k[::2]:
		y += i
	y += k[len(k) - 1]
	return y
for t in range(int(input())):
	common = input()
	print(stri(common))


t = int(input())
a = []
for x in range(t):
	b = str(input())
	a.append(str(b[0:2]) + str(b[3::2]))
for x in range(t):
	print(a[0])
	a.pop(0)


for z in range(int(input())):
	b = list(input())
	a = [b[0]]
	for x in range(1, len(b), 2):
		a.append(b[x])
	print(''.join(a))


t = int(input())
for i in range(t):
	s = input()
	n = len(s)
	a = []
	a.append(s[0])
	for i in range(1, n - 1, 2):
		a.append(s[i])
	a.append(s[n - 1])
	print(''.join(map(str, a)))


N = int(input())

def solve(s):
	res = s[:2]
	for i in range(3, len(s), 2):
		res += s[i]
	return res
for i in range(N):
	s = input()
	print(solve(s))


def solve(st):
	start = st[0]
	end = st[len(st) - 1]
	for i in range(1, len(st) - 1, 2):
		start += st[i]
	return start + end
try:
	for _ in range(int(input())):
		b = input()
		print(solve(b))
except EOFError:
	pass


def sub(s):
	a = []
	for i in range(len(s)):
		if i % 2 == 0:
			a.append(s[i])
	if len(s) % 2 == 0:
		a.append(s[-1])
	return ''.join(a)
test = int(input())
for i in range(test):
	s = input()
	print(sub(s))


t = int(input())
for r in range(t):
	s = input()
	w = []
	i = 0
	while i < len(s) - 1:
		if s[i] == s[i + 1]:
			w.append(s[i])
			i += 2
		else:
			w.append(s[i])
			i += 1
	w.append(s[-1])
	q = ''.join(w)
	print(q)


m = int(input())
for i in range(m):
	b = input()
	y = len(b)
	if len(b) <= 2:
		print(b)
	else:
		print(b[0], end='')
		for j in range(1, y - 1, 2):
			print(b[j], end='')
		print(b[y - 1])


def parse():
	num = int(input().rstrip())
	for _ in range(num):
		string = input().rstrip()
		print(string[0] + string[1::2])
parse()


from sys import stdin, stdout
q = int(input())
for i in range(q):
	b = input()
	s = ''
	for i in range(len(b)):
		if i % 2 == 0:
			s += b[i]
	s += b[len(b) - 1]
	print(s)


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


t = int(input())
for tt in range(t):
	a = input()
	a = list(a)
	l = ''
	k = a[1:len(a) - 1]
	for i in range(0, len(k), 2):
		l = l + k[i]
	print(a[0] + l + a[len(a) - 1])


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


t = int(input())
for i in range(t):
	s = input()
	s0 = s[:2]
	s1 = s[3::2]
	print(s0 + s1)


def main():
	t = int(input())
	for i in range(t):
		solve()

def solve():
	arr = list(input())
	final = arr[0]
	for i in range(1, len(arr), 2):
		final += arr[i]
	print(final)
main()


t = int(input())
while t > 0:
	s = input()
	l = len(s)
	k = ''
	for i in range(0, len(s), 2):
		k = k + s[i]
	print(k, s[l - 1], sep='')
	t = t - 1


t = int(input())
for j in range(t):
	b = input()
	print(b[::2] + b[-1])


def guess_the_string():
	string_b = input()
	string_a = string_b[0]
	if len(string_b) > 2:
		for letter in string_b[1:-1:2]:
			string_a += letter
		string_a += string_b[-1]
	else:
		string_a = string_b
	print(string_a)

def main():
	for cases in range(int(input())):
		guess_the_string()
main()


t = int(input())
for i in range(0, t):
	w = ''
	b = input()
	z = int(0)
	l = []
	while z < len(b):
		l.append(b[z:z + 2])
		z = z + 2
	for j in range(0, len(l)):
		if j == len(l) - 1:
			w = w + l[j]
		else:
			w = w + l[j][0:1]
	print(w)


for _ in range(int(input())):
	arr = list(str(input()))
	l = []
	for i in range(len(arr)):
		if i < 2:
			l.append(arr[i])
		elif i % 2 != 0:
			l.append(arr[i])
	print(''.join(l))


for i in range(int(input())):
	a = input()
	x = [a[0]]
	for j in range(1, len(a), 2):
		x.append(a[j])
	print(''.join(x))


import sys
from itertools import *
cont = sys.stdin.readlines()
cont = [i.strip('\n').split() for i in cont]
cont.pop(0)
for i in cont:
	t = i[0]
	ret = t[0]
	i = 1
	while i <= len(t):
		ret += t[i]
		i += 2
	print(ret)


t = int(input())
for q in range(t):
	b = input()
	print(b[0], end='')
	for i in range(1, len(b) - 1, 2):
		print(b[i], end='')
	print(b[len(b) - 1], end='')
	print()


t = int(input())
while t:
	t -= 1
	s = input()
	i = 0
	while i < len(s):
		print(s[i], end='')
		if i >= 1:
			i += 1
		i += 1
	print()


t = int(input())
for i in range(t):
	b = list(input())
	b2 = ''
	for (j, letter) in enumerate(b, 1):
		if j == 1 or j == len(b):
			b2 += letter
		elif j % 2 == 0 and j % 4 != 0 or ((j + 1) % 2 == 0 and (j + 1) % 4 != 0):
			b2 += letter
	print(b2)


t = int(input())
res = []
for i in range(t):
	b = input()
	j = 1
	a = b[0]
	while True:
		if j + 1 < len(b):
			a = a + b[j]
			j += 2
		else:
			a = a + b[j]
			break
	res.append(a)
print('\n'.join(res))


n = int(input())
y = []
for _ in range(n):
	x = input()
	y.append(x)
for ad in y:
	c = ad[0]
	for i in range(1, len(ad) - 1, 2):
		p = ad[i]
		c = c + p
	print(c + ad[len(ad) - 1])


n = int(input())
for i in range(n):
	s = input()
	if len(s) <= 2:
		print(s)
		continue
	x = s[0]
	j = 1
	while j < len(s) - 1:
		x = x + s[j]
		j += 2
	x = x + s[len(s) - 1]
	print(x)


def work():
	b = input()
	print(b[0], end='')
	i = 1
	while i < len(b):
		print(b[i], end='')
		i += 2
	print()
t = int(input())
while t != 0:
	t = t - 1
	work()


import sys
import math
import heapq
from collections import defaultdict, deque
input = sys.stdin.readline

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
for i in range(r()):
	a = list(input())
	b = a[0]
	for i in range(1, len(a) - 1, 2):
		b += a[i]
	b += a[-1]
	print(b)


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


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


import sys
input = sys.stdin.readline
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : input().strip().split()
from collections import defaultdict as df
t = int(input().strip())
for _ in range(t):
	s = list(input().strip())
	ans = ''
	n = len(s)
	for i in range(0, n - 1, 2):
		ans += s[i]
	ans += s[n - 1]
	print(ans)


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


for _ in range(int(input())):
	s = input()
	res = []
	for i in range(0, len(s), 2):
		res.append(s[i])
	res.append(s[-1])
	print(*res, sep='')


class Solution:

	def __init__(self):
		self.s = input()

	def solution(self):
		print(self.s[0] + self.s[1::2])

def main():
	for _ in range(int(input())):
		ob = Solution()
		ob.solution()
main()


test_case = int(input())
while test_case > 0:
	s = input()
	if len(s) <= 2:
		print(s)
		test_case -= 1
		continue
	res = s[0]
	for i in range(1, len(s) - 1, 2):
		res += s[i]
	res += s[-1]
	print(res)
	test_case -= 1


t = int(input())
for i in range(t):
	inp = input()
	if len(inp) == 2:
		print(inp)
		continue
	res = []
	res.append(inp[0])
	j = 1
	while j < len(inp):
		res.append(inp[j])
		j = j + 2
	for i in range(len(res)):
		print(res[i], end='')
	print()


for _ in range(int(input())):
	s = input()
	slen = len(s)
	if slen == 2:
		print(s)
	else:
		for i in range(0, slen, 2):
			print(s[i], end='')
			if i == slen - 2:
				print(s[slen - 1])


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	ans = [None for i in range(t)]
	for q in range(t):
		s = input()
		if len(s) <= 2:
			ans[q] = s
		else:
			ans[q] = s[::2]
			if len(ans[q]) < len(s) // 2 + 1:
				ans[q] += s[-1]
	for i in range(t):
		print(ans[i])
main()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	s = input()
	u = []
	for i in range(1, len(s) - 1, 2):
		u.append(s[i])
	u = ''.join(u)
	print(s[0] + u + s[-1])


test = int(input())
for i in range(test):
	s = input()
	newS = ''
	for j in range(len(s)):
		if j % 2 == 0 or j == len(s) - 1:
			newS = newS + s[j]
	print(newS)


def short(s, n):
	l = []
	for i in range(0, n - 1, 2):
		l.append(s[i])
	l.append(s[n - 1])
	return ''.join(l)
t = int(input())
for case in range(t):
	s = input()
	n = len(s)
	print(short(s, n))


T = int(input())
for _ in range(T):
	s = input()
	n = len(s)
	s1 = s[0]
	for i in range(1, n - 1, 2):
		s1 += s[i]
	s1 += s[n - 1]
	print(s1)


from sys import stdin, stdout
t = int(stdin.readline())
for _ in range(t):
	s = input()
	s = list(s)
	ans = []
	for i in range(0, len(s), 2):
		ans.append(s[i])
	ans.append(s[-1])
	print(''.join(ans))


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


t = int(input())
for i in range(0, t):
	b = list(input())
	a = ''
	if len(b) > 2:
		sub_b = b[1:len(b) - 1]
		j = 2
		while j <= len(sub_b):
			j = j - 1
			sub_b.pop(j)
			j += 2
		a = b[0] + ''.join(sub_b) + b[len(b) - 1]
	else:
		a = ''.join(b)
	print(a)


n = int(input())
lista_final = []
for i in range(0, n):
	lista = list(map(str, input()))
	for j in range(0, len(lista), 2):
		pos1 = j
		pos2 = j + 2
		pizza = lista[pos1:pos2]
		lista_final.append(pizza[0])
	lista_final.append(pizza[1])
	nueva_lista = ''.join(lista_final)
	print(nueva_lista)
	lista_final = []


t = int(input())
while t > 0:
	b = input()
	res = ''
	res += b[0]
	i = 1
	while i < len(b):
		res += b[i]
		i += 2
	print(res)
	t -= 1


t = int(input())
result = []
for i1 in range(t):
	str = input()
	out_str = ''
	l = (len(str) + 2) // 2
	for i2 in range(0, l - 1):
		out_str += str[2 * i2]
	out_str += str[-1]
	result.append(out_str)
for i3 in result:
	print(i3)


for _ in range(int(input())):
	str1 = input()
	list1 = list(str1)
	if len(list1) == 2:
		print(str1)
	else:
		list2 = []
		for i in range(1, len(list1) - 2, 2):
			list2.append(list1[i])
		print(list1[0] + ''.join(list2) + list1[-1])


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


t = input()
for i in range(int(t)):
	s = input()
	l = len(s)
	ans = s[0]
	j = 1
	while j < l - 1:
		ans += s[j]
		j += 2
	ans += s[-1]
	print(ans)


import math

def check(t, h, c, n):
	return abs(t - (n * (h + c) - c) / (2 * n - 1))

def solution():
	arr = input()
	n = len(arr)
	print(arr[0], end='')
	for i in range(1, n - 1, 2):
		print(arr[i], end='')
	print(arr[n - 1])
for _ in range(int(input())):
	solution()


n = int(input())
for i in range(n):
	s = input()
	t = s[:2]
	f = 0
	for j in range(2, len(s), 2):
		k = s[j:j + 2]
		if t[len(t) - 1] == k[0]:
			t += k[1]
		else:
			t += k
	print(t)


from math import *

def _in():
	return [int(x) for x in input().split(' ')]

def main():
	s = input()
	out = s[0]
	n = len(s)
	i = 1
	while i < n:
		out = out + s[i]
		i = i + 2
	print(out)
tt = 1
tt = int(input())
for _ in range(tt):
	main()


outlines = []
nooflines = int(input())
this_line = []
for i in range(nooflines):
	this_line.append(input())
for i in this_line:
	thisLine = list(i)
	for i in range(2, len(thisLine), 1):
		try:
			del thisLine[i]
		except IndexError:
			break
	outlines.append(''.join(thisLine))
for i in outlines:
	print(i)


import sys
from collections import defaultdict

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

def list_input():
	return list(map(int, sys.stdin.readline().strip().split()))
for _ in range(int(input())):
	s = input()
	a = s[0] + s[1]
	n = len(s)
	for i in range(3, n, 2):
		a += s[i]
	print(a)


def solve(x):
	a = []
	lenn = len(x)
	for i in range(0, lenn, 2):
		a.append(x[i])
	if lenn % 2 == 0:
		a.append(x[-1])
	return ''.join(a)
t = int(input())
results = []
for _ in range(0, t):
	b = input()
	results.append(solve(b))
for result in results:
	print(result)


from collections import defaultdict
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange
sys.setrecursionlimit(10 ** 2)

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline().strip())

def read_int_array():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())

def ri():
	return int(f.readline().strip())

def ria():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def rs():
	return list(f.readline().strip())

def bi(x):
	return bin(x)[2:]
from collections import deque
import math
NUMBER = 998244353

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def choose(n, k):
	if n < k:
		assert false
	return mult(factorial(n), modinv(mult(factorial(k), factorial(n - k))))
from collections import deque, defaultdict
import heapq
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def dfs(g, timeIn, timeOut, depths, parents):
	cnt = 0
	stack = [[1, 0, 0, 0]]
	while stack:
		(v, neig_i, parent, depth) = stack[-1]
		parents[v] = parent
		depths[v] = depth
		if neig_i == 0:
			timeIn[v] = cnt
			cnt += 1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i += 1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u, 0, v, depth + 1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1

def isAncestor(u: int, v: int, timeIn: list, timeOut: list) -> str:
	return timeIn[u] <= timeIn[v] and timeOut[v] <= timeOut[u]
cnt = 0

@bootstrap
def dfs(v, adj, timeIn, timeOut, depths, parents, parent=0, depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt += 1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u, adj, timeIn, timeOut, depths, parents, v, depth + 1)
	timeOut[v] = cnt
	cnt += 1
	yield

def solution(s):
	sol = [s[0]]
	for i in range(1, len(s), 2):
		sol.append(s[i])
	return ''.join(sol)

def main():
	T = 1
	T = ri()
	for i in range(T):
		s = rs()
		x = solution(s)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			(print >> output, str(x))
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()
if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
main()


tc = int(input())
while tc > 0:
	tc -= 1
	s = input()
	if len(s) == 2:
		print(s)
	else:
		res = s[0]
		for i in range(1, len(s), 2):
			res = res + s[i]
		print(res)


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

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

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	b = input()
	ans = ''
	n = len(b)
	for i in range(0, n, 2):
		ans += b[i]
	ans += b[-1]
	print(ans)


def koyomi(s):
	x = ''
	for i in range(0, len(s), 2):
		x += s[i]
	x += s[len(s) - 1]
	return x
for _ in range(int(input())):
	print(koyomi(input()))


def f(s, n):
	res = ''
	res += s[0]
	for i in range(1, n - 1, 2):
		res += s[i]
	res += s[n - 1]
	return res
for _ in range(int(input())):
	s = input()
	n = len(s)
	print(f(s, n))


n = int(input())
for i in range(n):
	out = ''
	s = input()
	out += s[0:2]
	f = 0
	for i in range(2, len(s)):
		if f == 0:
			f = 1
		else:
			out += s[i]
			f = 0
	print(out)


for _ in range(int(input())):
	s = input()
	if len(s) == 2:
		print(s)
	elif len(set(s)) == 1:
		print(s[0] * (len(s) // 2 + 1))
	else:
		i = 0
		ans = ''
		while i < len(s) - 1:
			ans += s[i]
			i += 2
		ans += s[-1]
		print(ans)


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	A = input().strip()
	print(A[0], end='')
	i = 1
	while i < len(A):
		print(A[i], end='')
		i += 2
	print()


te = int(input())
for j in range(0, te):
	b = input()
	n = len(b)
	i = 0
	t = b[i]
	i = i + 2
	while i < n - 1:
		t += b[i]
		i = i + 2
	t += b[n - 1]
	print(t)


n = int(input())
r = list()
tt = 1
for i in range(0, n):
	x = input()
	y = ''
	for i in x[1:-1]:
		if tt % 2 != 0:
			y += i
		tt += 1
	r.append(x[0] + y + x[-1])
for item in r:
	print(item)


t = int(input())
while t > 0:
	b = input()
	c = list(b)
	i = 1
	d = []
	x = c[0]
	y = c[len(c) - 1]
	while i < len(c) - 1:
		d.append(c[i])
		i = i + 2
	s = ''
	s = s.join(d)
	s = str(x) + s + str(y)
	print(s)
	t = t - 1


t = int(input())
while t > 0:
	s = input().lower()
	l = len(s)
	res = []
	for i in s[0:l:2]:
		res.append(i)
	res.append(s[-1])
	x = ''.join(res)
	print(x)
	t -= 1


for x in range(int(input())):
	m = input()
	print(m[0], end='')
	i = -1
	while i < len(m) - 2:
		i += 2
		print(m[i], end='')
	print()


n = int(input())
for _ in range(n):
	x = input()
	y = x[0]
	for i in range(1, len(x) - 1, 2):
		y += x[i]
	y += x[-1]
	print(y)


t = int(input())
for i in range(t):
	word = str(input())
	ans = word[:2]
	for j in range(3, len(word), 2):
		ans += word[j]
	print(ans)


for test_case in range(int(input())):
	s = input()
	i = 1
	print(s[0], end='')
	while i < len(s) - 1:
		if s[i] == s[i + 1]:
			print(s[i], end='')
			i += 1
		else:
			print(s[i], end='')
		i += 1
	print(s[len(s) - 1])


n = int(input())
ans = ''
while n > 0:
	ans = ''
	a = input()
	for i in range(len(a)):
		if i == 0 or i % 2 == 1:
			ans += a[i]
	n -= 1
	print(ans)


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

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

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	b = inputstring()
	a = b[0]
	for i in range(1, len(b) - 1):
		if i % 2 == 0:
			a += b[i]
	a += b[len(b) - 1]
	print(a)


def decoder(sample):
	size = len(sample)
	i = 0
	ans = ''
	while i < size:
		if i == 0:
			ans = ans + sample[0:2]
			i = i + 3
		else:
			ans = ans + sample[i]
			i = i + 2
	return ans

def main():
	t = int(input())
	b = 0
	while b < t:
		sample = input()
		print(decoder(sample))
		b = b + 1
main()


queries = int(input())
for i in range(queries):
	string = input()
	length = len(string)
	print(string[0], end='')
	for i in range(1, length - 1, 2):
		print(string[i], end='')
	print(string[length - 1])


import sys
import math
t = int(input())
cnt = 1
for j in range(t):
	n = list(input())
	cnt = 1
	x = []
	for i in n:
		if cnt == 1 or cnt == 2:
			x.append(i)
			cnt += 1
		else:
			if cnt % 2 == 0:
				x.append(i)
			cnt += 1
	print(*x, sep='')


for _ in range(int(input())):
	string = input()
	if len(string) % 2 != 0:
		ans = ''
		for i in range(0, len(string), 2):
			ans += string[i]
		ans += string[-1]
		print(ans)
	else:
		ans = ''
		for i in range(0, len(string), 2):
			ans += string[i]
		print(ans + string[-1])


test_cases = int(input())
for z in range(test_cases):
	b = input()
	a = b[0]
	for i in range(len(b)):
		if i % 2 != 0:
			if i != len(b) - 1:
				if b[i] == b[i + 1]:
					a += b[i]
	a += b[-1]
	print(a)


for r in [*open(0)][1:]:
	print(r[:-1:2] + r[-2])


t = int(input())
for trial in range(t):
	b = str(input())
	word = []
	for i in b:
		word.append(i)
	last = word[len(word) - 1]
	y = word[::2]
	y.append(last)
	y = ''.join(y)
	print(y)


n = int(input())
for _ in range(n):
	st = input()
	res = ''
	if len(st) == 2:
		print(st)
		continue
	for i in range(1, len(st), 2):
		if i == 1:
			res += st[:2]
		else:
			res += st[i]
	print(res)


def solve(arr):
	res = ''
	i = 0
	while i < len(arr) - 1:
		if arr[i] == arr[i + 1]:
			res += arr[i]
			i += 1
		else:
			res += arr[i]
		i += 1
	res += arr[len(arr) - 1]
	return res
test = int(input())
for i in range(test):
	s = input()
	print(solve(s))


def solve(string):
	newStr = ''
	for i in range(len(string)):
		if ord(string[i]) >= 97 and ord(string[i]) <= 122:
			if i == len(string) - 1 or i % 2 == 0:
				newStr += string[i]
			else:
				continue
	if len(newStr):
		return newStr
	return string
string = int(input())
for i in range(string):
	result = input()
	print(solve(result))


n = int(input())
a = [input() for i in range(n)]
for j in a:
	chars = []
	for i in range(0, len(j), 2):
		chars.append(j[i:i + 2])
	ans = ''
	for i in range(1, len(chars)):
		if chars[i][0] == chars[i - 1][-1]:
			chars[i - 1] = chars[i - 1][0:-1]
	for i in range(len(chars)):
		ans += chars[i]
	print(ans)


T = int(input())
for i in range(T):
	s = input()
	a = s[1:len(s) - 1]
	l = ''
	for j in range(len(s) - 2):
		if j % 2 == 0:
			l = l + a[j]
		else:
			continue
	print(s[0] + l + s[len(s) - 1])


def ans(str):
	if len(str) <= 2:
		return str
	else:
		return str[0] + str[1:-1:2] + str[-1]
n = int(input())
L = []
for i in range(n):
	L.append(ans(input()))
for s in L:
	print(s)


for _ in range(int(input())):
	l = list(input())
	ll = []
	for i in range(0, len(l), 2):
		ll.append(l[i])
	ll.append(l[len(l) - 1])
	x = ''.join(ll)
	print(x)


def original(s, str_len):
	ans = s[0]
	if str_len == 2:
		return s
	else:
		for i in range(1, str_len, 2):
			ans += s[i]
		return ans
cases = int(input())
for i in range(cases):
	s = input()
	print(original(s, len(s)))


import sys
input = sys.stdin.readline

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()

def lower_letters():
	lowercase = [chr(i) for i in range(97, 97 + 26)]
	return lowercase

def upper_letters():
	uppercase = [chr(i) for i in range(65, 65 + 26)]
	return uppercase
for _ in range(int(input())):
	a = list(input())
	ans = []
	ans += a[0]
	for i in range(len(a) - 1):
		if i % 2 != 0:
			ans.append(a[i])
	ans += a[-1]
	print(str(''.join(ans)).strip())


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def instr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def diff(x, y):
	if x[1] - x[0] > y[1] - y[0]:
		return 1
	elif x[1] - x[0] == y[1] - y[0]:
		return x[0] < y[0]
	else:
		return 0

def main():
	t = inp()
	for l in range(t):
		s = instr()
		a = []
		a.append(s[0])
		a.append(s[1])
		for i in range(3, len(s), 2):
			a.append(s[i])
		for i in range(len(a)):
			print(a[i], end='')
		print('')
main()


def solve(s):
	return s[0] + s[1:-2:2] + s[-1]
t = int(input())
for i_t in range(t):
	s = input()
	print(solve(s))


num = int(input(''))
i = 0
while i < num:
	string = input('')
	new_str = string[0]
	for j in range(2, len(string) - 1, 2):
		new_str += string[j]
	new_str += string[-1]
	print(new_str)
	i += 1


import sys

def gets():
	return sys.stdin.readline().strip()

def get():
	return int(sys.stdin.readline().strip())

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

def getli():
	return list(map(int, sys.stdin.readline().strip().split()))
for _ in range(get()):
	s = gets()
	for i in range(0, len(s) - 1, 2):
		print(s[i], end='')
	print(s[-1])


def Short_substring(b):
	i = 0
	a = ''
	while i <= len(b) - 1:
		a = a.join(b[i])
		print(a, end='')
		i += 2
	a = ''.join(b[len(b) - 1])
	return a
n = int(input())
for i in range(n):
	stri = str(input())
	print(Short_substring(stri))


from sys import stdin, stdout
from collections import Counter

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

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

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
for i in range(ip()):
	s = input()
	s2 = ''
	s2 += s[0]
	x = set()
	for i in range(1, len(s) - 1):
		if s[i] == s[i + 1] and i not in x:
			s2 += s[i]
			x.add(i + 1)
	s2 += s[-1]
	print(s2)


t = int(input())
while t > 0:
	t -= 1
	s = input()
	k = list(s)
	l = len(s)
	u = ''
	uu = 0
	j = 0
	n = 0
	nn = 0
	f = 0
	for i in range(0, l, 2):
		u += k[i]
	if n % 2 == 0:
		print(u + k[n - 1])


t = int(input())
for testcase in range(t):
	a = input()
	n = len(a)
	x = ''
	if n == 2:
		print(a)
	else:
		for i in range(1, n - 1, 2):
			x = x + a[i]
		print(a[0] + x + a[n - 1])


n = int(input())
h = []
for i in range(n):
	c = input()
	h.append(c)
h.reverse()
for i in range(n):
	c = h[-1]
	h.pop()
	output = c[0]
	output += c[1::2]
	print(output)


t = int(input())
while t > 0:
	n = str(input())
	c = n[0]
	for i in range(1, len(n) - 1, 2):
		c = c + n[i]
	c = c + n[len(n) - 1]
	print(c)
	t = t - 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 = int(input())
for i in range(n):
	s = str(input())
	j = 0
	v = ''
	while j < len(s):
		if j == len(s) - 2:
			v = v + s[j] + s[j + 1]
			j = j + 2
		else:
			v = v + s[j]
			j = j + 2
	print(v)


for i in range(int(input())):
	a = input()
	b = ''
	s = 1
	for j in range(len(a)):
		if s == 1:
			b += a[j]
		s *= -1
	b += a[-1]
	print(b)


for _ in range(int(input())):
	s = input()
	print(s[0] + s[1], end='')
	for i in range(3, len(s), 2):
		print(s[i], end='')
	print('\r')


def solve(s):
	arr = [s[0]]
	for i in range(1, len(s) - 2):
		if i % 2 != 0:
			arr.append(s[i])
	arr.append(s[len(s) - 1])
	print(''.join((str(i) for i in arr)))
test_case = int(input())
while test_case != 0:
	s = str(input())
	solve(s)
	test_case = test_case - 1


no_of_strings = input()
substrings = []
all_a = []
a = ''
flag = 0
for i in range(int(no_of_strings)):
	b = input()
	if len(b) == 2:
		a = b
	else:
		for j in range(len(b) - 1):
			substrings.append(b[j:j + 2])
		a = a + substrings[0][0]
		for substring in substrings:
			if flag == 0:
				a = a + substring[1]
				flag = 1
			else:
				flag = 0
	all_a.append(a)
	substrings = []
	a = ''
	flag = 0
for i in all_a:
	print(i)


for i in range(int(input())):
	b = input()
	ans = b[:2]
	for j in range(3, len(b), 2):
		ans += b[j]
	print(ans)


arg = int(input())
for i in range(0, arg):
	s = list(input().strip())
	res = s[0]
	for i in range(1, len(s) - 1, 2):
		res += s[i]
	res += s[-1]
	print(''.join((str(d) for d in res)))


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


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


cases = int(input())
for _ in range(cases):
	res = []
	s = input()
	res.append(s[0])
	for i in range(1, len(s) - 1, 2):
		res.append(s[i])
	res.append(s[-1])
	print(''.join(res))


x = int(input())
for i in range(x):
	st = list(input())
	if len(st) <= 2:
		print(''.join(st))
	else:
		i = 1
		while i < len(st) - 1:
			st.pop(i)
			i += 1
		print(''.join(st))


n = int(input())
for _ in range(n):
	s = str(input())
	s1 = ''
	s1 += s[0]
	for i in range(1, len(s)):
		if i % 2 != 0:
			s1 += s[i]
	print(s1)


t = int(input())
for i1 in range(t):
	s = input()
	c = ''
	i = 0
	if len(s) // 2 % 2 == 0:
		while i < len(s) - 1:
			c = c + s[i] + s[i + 1]
			i = i + 4
		c = c + s[len(s) - 1]
	else:
		while i < len(s):
			c = c + s[i] + s[i + 1]
			i = i + 4
	print(c)


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])


t = int(input())
while t > 0:
	s = input()
	current = s[1]
	res = s[0]
	x = 0
	for i in s[1:len(s) - 1]:
		if i == current:
			x += 1
			if x % 2 == 0:
				res += i
		else:
			current = i
			x = 1
	print(res + s[-1])
	t -= 1


for _ in range(int(input())):
	b = input().rstrip()
	a = ''
	r = []
	i = 0
	j = 2
	while i < len(b):
		s = b[i:j]
		r.append(s)
		i += 2
		j += 2
	i = 0
	while i < len(r):
		if i == len(r) - 1:
			a += r[i]
		else:
			a += r[i][0]
		i += 1
	print(a)


import os
import sys
from io import BytesIO, IOBase
import math

def inputIntArray():
	return list(map(int, input().rstrip().split()))

def inputArray():
	return input().rstrip().split()

def inputVars():
	return map(int, input().rstrip().split())

def inputNum():
	return int(input())
sys.setrecursionlimit(100000)

def main():
	for _ in range(inputNum()):
		b = list(input())
		a = b[0:2]
		for pos in range(2, len(b) - 1, 2):
			temp = b[pos] + b[pos + 1]
			if a[-1] == b[pos]:
				a += b[pos + 1]
			else:
				a += temp
		print(''.join(a))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for case in range(t):
	s = input()
	n = len(s)
	arr = []
	arr.append(s[0])
	i = 2
	while i < n:
		arr.append(s[i])
		i = i + 2
	arr.append(s[n - 1])
	for i in arr:
		print(i, end='')
	print()


t = int(input())
for o in range(t):
	s = input()
	l = ''
	l += s[0]
	l += s[1]
	i = 3
	k = len(s)
	while i < k:
		l += s[i]
		i += 2
	print(l)


import heapq as heap
t = int(input())
for _ in range(t):
	s = input()
	res = s[0]
	for i in range(1, len(s), 2):
		res += s[i]
	if len(s):
		print(res)
	else:
		print(res + s[-1])


def solve():
	a = input()
	l = len(a)
	b = ''
	b += a[0]
	for i in range(1, l - 1, 2):
		b += a[i]
	b += a[l - 1]
	print(b)
n = int(input())
for i in range(n):
	solve()


c = []
for i in range(int(input())):
	c.append(input())
for elem in c:
	elem = list(elem)
	for i in range(len(elem) - 2):
		if elem[i] == elem[i + 1]:
			elem[i + 1] = ''
	print(''.join(elem))


t = int(input())
for T in range(t):
	b = input()
	answer = [b[0]] + [b[i] for i in range(1, len(b), 2)]
	print(''.join(answer))


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


t = int(input())
while t:
	s = input()
	print(s[::2] + s[-1])
	t = t - 1


def read_int():
	n = int(input())
	return n

def read_ints():
	ints = [int(x) for x in input().split(' ')]
	return ints

def solve(b):
	a = b[:2]
	for i in range(3, len(b), 2):
		a += b[i]
	return a
t = read_int()
for case in range(t):
	b = input()
	sol = solve(b)
	print(sol)


def dup(string):
	word = []
	word.append(string[0])
	for i in range(1, len(string), 2):
		word.append(string[i])
	return ''.join(word)
t = int(input())
for i in range(t):
	b = str(input())
	print(dup(b))


t = int(input())
for _ in range(t):
	s = str(input())
	l = list(s)
	nl = []
	if len(l) >= 3:
		for i in range(2, len(l) - 1, 2):
			l[i] = '-'
		for i in l:
			if i != '-':
				nl.append(i)
		s = ''.join(nl)
		print(s)
	else:
		print(s)


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


def sol(s):
	start = s[0]
	end = s[len(s) - 1]
	mid = ''
	ns = s[1:len(s) - 1]
	i = 1
	while i < len(ns):
		mid += ns[i]
		i += 2
	return start + mid + end
t = int(input())
for _ in range(t):
	s = input()
	print(sol(s))


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


ll = lambda : list(map(int, input().split()))
s = lambda : input()
v = lambda : map(int, input().split())
ii = lambda : int(input())
from collections import *
for _ in range(ii()):
	a = input()
	d = {}
	p = 0
	s = ''
	c = 0
	for i in range(0, len(a), 2):
		s += a[i]
	s += a[-1]
	print(s)


n = int(input())
for i in range(n):
	x = input()
	f = x[0]
	l = x[-1]
	x = x[1:len(x) - 1:2]
	print(f + x + l)


t = int(input())
while t > 0:
	s = input()
	out = s[0] + s[2:len(s) - 1:2] + s[len(s) - 1]
	print(out)
	t -= 1


for i in range(int(input())):
	s = input()
	length = len(s)
	for j in range(0, length, 2):
		print(s[j], end='')
	print(s[-1])


for _ in range(int(input())):
	s = input()
	arr = list(s)
	for k in range(2, len(s) - 1, 2):
		arr.pop(k)
		arr.insert(k, ' ')
	j = ''.join(arr)
	j = j.replace(' ', '')
	print(j)


t = int(input())
while t > 0:
	b = input()
	a = ''
	for elem in b[::2]:
		a = a + elem
	a = a + b[len(b) - 1]
	print(a)
	print('\n')
	t -= 1


n = input('')
n = int(n)
str = []
for i in range(n):
	str.append(input(''))
for j in str:
	j = list(j)
	if len(j) == 2:
		print(''.join(j))
	else:
		sol = ['a'] * (int(len(j) / 2) + 1)
		sol[0] = j[0]
		sol[len(sol) - 1] = j[len(j) - 1]
		m = 1
		for k in range(1, len(j), 2):
			sol[m] = j[k]
			m = m + 1
		print(''.join(sol))


for t in range(int(input())):
	arr = input()
	ans = []
	ans.append(arr[0])
	for i in range(1, len(arr) - 1, 2):
		ans.append(arr[i])
	ans.append(arr[len(arr) - 1])
	print(''.join(ans))


from sys import stdin, stdout
import sys
INF = 1000000000.0
import bisect

def get_int():
	return int(stdin.readline().strip())

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_array():
	return list(map(int, stdin.readline().strip().split()))

def get_string():
	return stdin.readline().strip()

def op(c):
	return stdout.write(c)
import math
for _ in range(int(stdin.readline())):
	a = get_string()
	if len(a) == 2:
		print(a)
		continue
	b = ''
	for i in range(0, len(a), 2):
		b += a[i]
	print(b + a[-1])


for _ in range(int(input())):
	str = input()
	if len(str) == 1 or len(str) == 2:
		print(str)
	else:
		r = '' + str[0]
		for i in range(1, len(str) - 1, 2):
			r += str[i]
		r += str[len(str) - 1]
		print(r)


import math
import os
import random
import re
import sys
t = int(input().strip())
l = []
r = []
for i in range(t):
	l.append(str(input()))
for j in range(len(l)):
	k = 0
	s = ''
	while k <= len(l[j]) - 1:
		if k == 0 or k == len(l[j]) - 1:
			s = s + l[j][k]
			k = k + 1
		else:
			s = s + l[j][k]
			k = k + 2
	r.append(s)
for ty in range(len(r)):
	print(r[ty])


t = int(input())
for i in range(t):
	b = input()
	a = b[0]
	j = 1
	l = len(b)
	while j < l:
		if j == l - 1:
			a = a + b[l - 1]
			break
		a = a + b[j]
		j += 2
	print(a)


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

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

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

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


t = int(input())
for i in range(t):
	b = input()
	arr = []
	for i in range(0, len(b) - 1, 2):
		arr.append([b[i], b[i + 1]])
	fin = ''
	fin += arr[0][0]
	for i in range(len(arr) - 1):
		if arr[i][1] == arr[i + 1][0]:
			fin += arr[i][1]
		else:
			fin += arr[i][1]
			fin += arr[i + 1][0]
	fin += arr[-1][1]
	print(fin)


for z in range(int(input())):
	q = str(input())
	print(q[0], end='')
	o = -1
	while o < len(q) - 2:
		o += 2
		print(q[o], end='')
	print()


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from collections import Counter
from bisect import bisect_left
import sys
from queue import PriorityQueue
mod = 1000000007

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

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

def I():
	return int(stdin.readline())

def printIn(ob):
	return stdout.write(str(ob) + '\n')

def powerLL(n, p):
	result = 1
	while p:
		if p & 1:
			result = result * n % mod
		p = int(p / 2)
		n = n * n % mod
	return result

def myCode():
	str = input()
	string = str[0]
	cnt = 0
	for i in range(2, len(str), 2):
		if str[i] == str[i - 1]:
			string += str[i]
	string += str[len(str) - 1]
	print(string)

def main():
	for t in range(I()):
		myCode()
main()


for _ in range(int(input())):
	letras = input()
	string = []
	for i in range(len(letras)):
		string.append(letras[i])
	i = 0
	while i < len(string) - 2:
		string.pop(i + 1)
		i += 1
	for i in range(len(string)):
		print(string[i], end='')
	print('')


n = int(input())
strs = [input() for i in range(n)]

def guesser(str):
	new_str = ''
	for i in range(len(str)):
		if i % 2 != 0 or i == 0:
			new_str = new_str + str[i]
	return new_str
for i in range(n):
	print(guesser(strs[i]))


for _ in range(int(input())):
	r = input()
	print(r[0] + r[1::2])


t = int(input())
while t > 0:
	s = [i for i in input()]
	s1 = []
	for i in range(len(s)):
		if i == 0 or i == len(s) - 1:
			s1.append(s[i])
		elif i % 2 == 1:
			s1.append(s[i])
	print(''.join(s1))
	t -= 1


import sys, os
import math
from fractions import Fraction
from collections import defaultdict

def linput():
	return list(minput())

def minput():
	return map(int, sys.stdin.readline().strip().split())
t = int(input())
while t != 0:
	t -= 1
	a = input()
	b = ''
	j = 0
	for i in range(0, len(a), 2):
		b += a[i]
		j = i
	if j != len(a) - 1:
		b += a[-1]
	print(b)


def fun():
	b = input()
	c = ''
	i = 0
	while i < len(b):
		c = c + b[i]
		i = i + 2
	c = c + b[len(b) - 1]
	return c
for z in range(int(input())):
	print(fun())


def main():
	st = input()
	stans = st[0]
	for i in range(1, len(st) - 1, 2):
		stans += st[i]
	stans += st[-1]
	print(stans)
for t in range(int(input())):
	main()


s = eval(input())
for i in range(s):
	name = input()
	sub = name[0:2]
	for j in range(2, len(name)):
		if j % 2 != 0:
			sub = sub + name[j]
	print(sub)


for _ in range(int(input())):
	s = input()
	sr = []
	for i in range(3, len(s), 2):
		sr.append(s[i])
	print(s[0] + s[1] + ''.join(sr))


T = int(input())

def solve():
	s = input()
	ans = ''
	for i in range(len(s) // 2):
		ans += s[2 * i]
	ans += s[-1]
	return ans
for _ in range(T):
	print(solve())


import sys
import os
import heapq
import math
try:
	path = './file/input.txt'
	if os.path.exists(path):
		sys.stdin = open(path, 'r')
except:
	pass
t = int(input())

def printd(value):
	pass

def case():
	arr = input()
	result = arr[0]
	for index in range(1, len(arr), 2):
		result += arr[index]
	print(result)
for _ in range(t):
	case()


n = int(input())
l = []
for i in range(0, n):
	l.append(input())
resarr = []
res = ''
for j in l:
	res = ''
	r = list(j)
	if len(r) > 1:
		res = res + r[0] + r[1]
		for k in range(2, len(r)):
			if k % 2 != 0:
				res = res + r[k]
		resarr.append(res)
	else:
		resarr.append(r[0])
for h in resarr:
	print(h)


def shrt_substr(b):
	if len(b) == 2:
		return b
	l = []
	l.append(b[0])
	for i in range(1, len(b), 2):
		l.append(b[i])
	a = ''.join(l)
	return a
t = int(input())
for _ in range(t):
	b = input()
	print(shrt_substr(b))


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


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	s = input().rstrip()
	result = s[0]
	for i in range(1, len(s) - 1, 2):
		result += s[i]
	result += s[-1]
	print(result)


t = int(input())
for i in range(t):
	st = input()
	new1 = str()
	new1 = st[0]
	for j in range(1, len(st), 2):
		new1 += st[j]
	print(new1)


test_cases = int(input())
for _ in range(test_cases):
	string = input()
	res = ''
	it = iter(string)
	res = res + next(it)
	try:
		while True:
			res = res + next(it)
			next(it)
	except StopIteration:
		pass
	print(res)


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


for _ in range(int(input())):
	str = input()
	newstr = ''
	newstr += str[0]
	for i in range(1, len(str) - 1):
		if i % 2 == 1:
			newstr += str[i]
	newstr += str[-1]
	print(newstr)


for w in range(int(input())):
	s = input()
	n = len(s)
	print(s[0] + s[1::2])


t = int(input())
for i in range(t):
	s = list(input())
	s.append(s[-1])
	for j in range(0, len(s), 2):
		print(s[j], end='')
	print()


for _ in range(int(input())):
	s = input()
	w = ''
	if len(s) == 2:
		w = s
	else:
		n = (len(s) + 2) // 2
		w += s[0]
		for i in range(1, len(s) - 1, 2):
			w += s[i]
		w += s[len(s) - 1]
	print(w)


def solve():
	string = list(input())
	ans = ''
	n = len(string)
	if n == 2:
		return ''.join(string)
	i = 0
	while i < n:
		ans += string[i]
		i += 2
	ans += string[i - 1]
	return ans

def main():
	n = int(input())
	while n > 0:
		ans = solve()
		print(ans)
		n -= 1
main()


t = int(input())
for i in range(t):
	b = input()
	a = []
	for j in range(0, len(b) - 1, 2):
		a1 = [b[j], b[j + 1]]
		a.append(a1)
	c = []
	for k in range(len(a)):
		if k != len(a) - 1:
			c.append(a[k][0])
		else:
			c.append(a[k][0])
			c.append(a[k][1])
	s = ''.join(c)
	print(s)


for t in range(int(input())):
	b = input()
	l = len(b)
	a = b[0:2]
	if l > 2:
		i = 3
		while i < l:
			a += b[i]
			i += 2
	print(a)


t = int(input())
while t:
	t -= 1
	s = input()
	i = 2
	out = s[0:2]
	while i < len(s):
		if i % 2 != 0:
			out = out + s[i]
		i += 1
	print(out)


n = int(input())

def decode(s):
	if len(s) <= 2:
		return s
	return f'{s[0]}{s[1:-1:2]}{s[-1]}'
for line in range(n):
	s = input()
	print(decode(s))


a = int(input())
for i in range(a):
	s = str(input())
	a = s[0]
	b = ''
	c = s[-1]
	for j in range(1, len(s) - 1, 2):
		if s[j] == s[j + 1]:
			b = b + str(s[j])
		else:
			b = str(s[j]) + str(j + 1)
	print(a + b + c)


for tc in range(int(input())):
	a = input()
	new = []
	for i in range(0, len(a), 2):
		new.append(a[i] + a[i + 1])
	n = ''
	for i in new:
		n += i[0]
	n += new[-1][1]
	print(n)


I = input
t = int(I())
for tt in range(t):
	s = I()
	i = 0
	n = len(s)
	while i < n - 1:
		print(s[i], end='')
		i += 2
	print(s[n - 1])


tasksCount = int(input())
tasks = []
answers = []
for i in range(tasksCount):
	tasks.append(input())
for inStr in tasks:
	result = inStr[0:2]
	index = 2
	while index < len(inStr):
		if (index - 2) % 2 != 0:
			result += inStr[index]
		index += 1
	print(result)


import math as mt
import sys, string
input = sys.stdin.readline
from collections import defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
t = I()
for i in range(t):
	a = input().strip()
	b = a[:2]
	if len(a) > 2:
		b += a[3::2]
	print(b)


from sys import stdin
import math
n = int(stdin.readline())
for _ in range(n):
	s = stdin.readline().rstrip()
	ans = ''
	for i in range(1, len(s) - 1, 2):
		ans += s[i]
	print(s[0] + ans + s[-1])


for i in range(int(input())):
	s = input()
	p = s[:1]
	for j in range(1, len(s), 2):
		if j < len(s) - 2:
			p = p + s[j + 1]
		else:
			p = p + s[j:]
			break
	print(p)


from math import *
from copy import *
from heapq import *
from string import *
from random import *
from bisect import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from decimal import Decimal
from collections import Counter
from collections import defaultdict

def solve(l):
	n = len(l)
	if n == 2:
		return l
	ans = l[:2]
	for i in range(3, n, 2):
		ans += l[i]
	return ans
T = int(input())
for _ in range(T):
	l = input()
	print(solve(l))


for i in range(int(input())):
	v = str(input())
	print(v[0], end='')
	l = -1
	while l <= len(v) - 2:
		l += 2
		print(v[l], end='')
	print()


def get_a(b):
	a = b[:2]
	for i in range(2, len(b)):
		if i % 2 == 0:
			continue
		a += b[i]
	return a
T = int(input())
for t in range(T):
	b = input()
	ans = get_a(b)
	print(ans)


t = int(input())
for i in range(t):
	s = input()
	for j in range(0, len(s), 2):
		print(s[j], sep='', end='')
	print(s[-1])


v = int(input())
for i in range(v):
	df = input()
	j = 1
	s = ''
	s = s + df[0]
	while j < len(df):
		s = s + df[j]
		j = j + 2
	print(s)


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


def calc(s):
	ans = s[0:2]
	for i in range(3, len(s), 2):
		ans += s[i]
	print(ans)
n = int(input())
for i in range(n):
	s = input()
	calc(s)


for _ in range(int(input())):
	data = input()
	i = 0
	counter = 0
	out = ''
	size = len(data)
	while i < size:
		out += data[i]
		if i + 2 == size:
			out += data[size - 1]
		i += 2
	print(out)


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	b = input()
	a = b[0] + b[1]
	for i in range(3, len(b)):
		if i % 2 == 1:
			a += b[i]
	print(a)


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


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b / gcd(a, b)

def bs(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return arr[mid]
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def swap(list, pos1, pos2):
	(list[pos1], list[pos2]) = (list[pos2], list[pos1])
	return list
t = int(input())
for _ in range(t):
	b = input()
	a = b[0]
	for i in range(1, len(b), 2):
		a += b[i]
	print(a)


for _ in range(int(input())):
	s = str(input())
	print(end=s[:2])
	for j in range(3, len(s), 2):
		print(end=s[j])
	print()


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


for _ in range(int(input())):
	l = list(input())
	b = []
	a = 0
	c = 0
	j = 0
	s = ''
	if len(l) == 2:
		print(''.join(l))
	else:
		s = l[0]
		for i in range(1, len(l), 2):
			s += l[i]
		print(s)


for i in range(int(input())):
	s = input()
	l = len(s)
	a = [s[0], s[1]]
	t = len(s) - 2
	j = 3
	while t and j:
		a.append(s[j])
		t = t - 2
		j = j + 2
	g = ''.join(map(str, a))
	print(g)


t = int(input())
while t:
	b = input()
	letters = []
	letters.append(b[0:2])
	for i in range(3, len(b) + 1, 2):
		letters.append(b[i])
	a = ''.join(letters)
	t -= 1
	print(a + '\n')


t = int(input())
for m in range(t):
	string = input()
	ans = []
	ans.append(string[0])
	for i in range(2, len(string) - 1):
		if string[i - 1] == string[i] and i % 2 == 0:
			ans.append(string[i - 1])
			i += 2
	ans.append(string[len(string) - 1])
	string1 = ''.join([str(i) for i in ans])
	print(string1)


def evenrange(start, stop):
	i = start
	while i < stop:
		yield i
		i = i + 2

def superString(str):
	s = str[0] + str[1]
	for i in evenrange(3, len(str)):
		s += str[i]
	return s
s = []
n = int(input())
for i in range(n):
	str = input()
	s.append(str)
for str in s:
	print(superString(str))


def main():
	t = int(input())
	for i in range(t):
		string = input()
		ans = ''
		i = 0
		while i < len(string):
			ans += string[i]
			i += 2
		if len(string) % 2 == 0:
			ans += string[-1]
		print(ans)
main()


l = []

def ck(b):
	a = ''
	for i in range(0, len(b) - 2, 2):
		a = a + b[i]
	return a + b[-2:]
for _ in range(int(input())):
	l.append(input())
for i in l:
	print(ck(i))


T = int(input())
for t in range(T):
	st = input()
	n = len(st)
	a = st[:2]
	for i in range(3, n, 2):
		a = a + st[i]
	print(a)


for _ in range(int(input())):
	b = input()
	a = ''
	for i in range(0, len(b), 2):
		f = b[i:i + 2]
		if len(a) > 0 and a[len(a) - 1] == f[0] and (len(f) > 1):
			a += f[1]
		else:
			a += f
	print(a)


for _ in range(int(input())):
	s = input()
	r = ''
	r += s[:2]
	i = 3
	while i < len(s):
		r += s[i]
		i += 2
	print(r)


from functools import reduce
import collections
import math
import sys

class Read:

	@staticmethod
	def string():
		return input()

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(delimiter=' '):
		return input().split(delimiter)

	@staticmethod
	def list_int(delimiter=' '):
		return list(map(int, input().split(delimiter)))

def main():
	t = Read.int()
	for _ in range(t):
		b = Read.string()
		a = b[0]
		for i in range(1, len(b) - 1, 2):
			a += b[i]
		a += b[len(b) - 1]
		print(a)
main()


test = int(input())
for i in range(0, test):
	temp = input()
	j = 0
	l = []
	if len(temp) == 2:
		l = list(temp)
	else:
		while j < len(temp):
			l.append(temp[j])
			j = j + 2
		l.append(temp[len(temp) - 1])
	for j in range(0, len(l)):
		print(l[j], end='')
	print()


t = int(input())
for z in range(t):
	st = input()
	n = len(st)
	an = st[0]
	for i in range(1, n - 1, 2):
		an += st[i]
	an += st[n - 1]
	print(an)


for t in range(int(input())):
	b = list(input())
	a = b[0]
	b.pop(0)
	c = b[-1]
	del b[-1]
	for i in range(0, len(b), 2):
		a += b[i]
	print(a + c)


test_case = int(input())
while test_case:
	b = input()
	temp = b[0]
	for i in range(1, len(b), 2):
		temp += b[i]
	print(temp)
	test_case -= 1


t = int(input())
for i in range(t):
	s = input()
	r = s[:2]
	for i in range(3, len(s), 2):
		r += s[i]
	print(r)


def tran(s):
	st = [s[0]]
	for i in range(len(s) - 1):
		if i > 0 and i % 2 == 0:
			st.append(s[i])
	st.append(s[-1])
	ss = ''
	for i in st:
		ss = ss + i
	return ss
t = int(input())
ans = []
for i in range(t):
	s = input()
	r = tran(s)
	ans.append(r)
for i in ans:
	print(i)


for _ in range(int(input())):
	b = input()
	a1 = b[0]
	a_last = b[-1]
	i = 1
	a = ''
	while i < len(b) - 1:
		a += b[i]
		i = i + 2
	print(a1 + a + a_last)


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
mod = 1000000007
from math import *
import bisect
from decimal import *
getcontext().prec = 50
abc = 'abcdefghijklmnopqrstuvwxyz'

def fn(n):
	c = 0
	while n % 2 == 0:
		c += 1
		n //= 2
	return c
pi = 3.141592653589793

def main():
	for _ in range(ii()):
		s = si()
		ans = s[0]
		for i in range(1, len(s) - 1, 2):
			ans += s[i]
		ans += s[-1]
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
p = 1
while p <= t:
	s = input()
	l = len(s)
	i = 0
	while i < l:
		if i % 2 == 0:
			print(s[i], end='')
		elif i == l - 1:
			print(s[i], end='')
			print('\r')
		i += 1
	p += 1


import math
from decimal import *
getcontext().prec = 30
t = int(input())
while t:
	t -= 1
	s = input()
	ans = s[0]
	for i in range(1, len(s) - 1, 2):
		ans += s[i]
	ans += s[len(s) - 1]
	print(ans)


t = int(input())
for _ in range(t):
	s = input()
	n = len(s) // 2 + 1
	print(s[0], end='')
	for (i, c) in enumerate(s[1:-1]):
		if i % 2 == 0:
			print(c, end='')
	print(s[-1])


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
for _ in range(int(ri())):
	s = ri()
	i = 0
	ans = []
	for i in range(0, len(s), 2):
		ans.append(s[i])
	if i == len(s) - 1:
		print(''.join(ans))
	else:
		ans.append(s[-1])
		print(''.join(ans))


from math import *
from itertools import *
from collections import *

def ii():
	return int(input())

def mas():
	return [int(i) for i in input().split()]

def mapis():
	return map(int, input().split())
INF = 1000000000.0 + 1

def solve():
	s = input()
	b = []
	for i in range(1, len(s), 2):
		b.append(s[i - 1] + s[i])
	a = b[0]
	for i in range(1, len(b)):
		a += b[i][1]
	print(a)

def main():
	t = ii()
	while t:
		solve()
		t -= 1
main()


import sys

def main():
	t = int(next(sys.stdin))
	for _ in range(t):
		ln = next(sys.stdin)
		s = ln.strip()
		print(solve(s))

def solve(s):
	ans = ''
	n = len(s)
	i = 0
	while i < n:
		ans += s[i] + s[i + 1]
		i += 4
	if i - 1 < n:
		ans += s[i - 1]
	return ans
assert solve('ac') == 'ac'
assert solve('bccddaaf') == 'bcdaf'
assert solve('abbaac') == 'abac'
assert solve('abbc') == 'abc'
main()


import math
import sys

def dict_sort(ans):
	ans = sorted(ans.items(), reverse=True, key=lambda kv: kv[1])

def is_prime(n):
	if n == 1:
		return 0
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def alphbates():
	return 'abcdefghijklmnopqrstuvwxyz'

def inp():
	ls = list(map(int, input().split()))
	return ls
t = int(input())
for _ in range(t):
	s = input()
	ans = ''
	i = 1
	while i < len(s) - 1:
		ans += s[i]
		i += 2
	print(s[0] + ans + s[len(s) - 1])


t = int(input())
for _ in range(t):
	b = input()
	if len(b) == 2:
		print(b)
	else:
		print(b[0], end='')
		l = len(b)
		for i in range(1, l - 2):
			if i % 2 != 0:
				continue
			else:
				print(b[i], end='')
		print(b[l - 2], end='')
		print(b[l - 1])


n = int(input())
ans = ''
for i in range(n):
	a = input()
	ans += a[:2]
	ans += a[3::2]
	print(ans)
	ans = ''


n = int(input())
for i in range(n):
	s = list(input())
	k = [s[0], s[1]]
	for j in range(2, len(s)):
		if j % 2 != 0:
			k.append(s[j])
	for elem in k:
		print(elem, end='')
	print()


def decypher(a):
	if len(a) > 2:
		for i in range(2, len(a), 2):
			a[i] = ''
	else:
		return ''.join(a)
	return ''.join(a)
t = int(input())
for i in range(t):
	a = list(input())
	print(decypher(a))


T = int(input())
while T:
	some_string = input()
	x = 2
	res = [some_string[y - x:y] for y in range(x, len(some_string) + x, x)]
	ans_str = some_string[:2]
	res.remove(ans_str)
	for element in res:
		character = element[1:]
		ans_str = ans_str + character
	print(ans_str)
	T -= 1


n = int(input())
for i in range(n):
	ans = []
	l = list(input())
	ans.append(str(l[0]))
	ans.append(str(l[1]))
	if len(l) > 3:
		for i in range(1, len(l) // 2):
			ans.append(l[i * 2 + 1])
	ans = ''.join(ans)
	print(ans)


num = int(input())
for i in range(num):
	inputString = input()
	outstring = inputString[0:min(2, len(inputString))]
	for id in range(3, len(inputString), 2):
		outstring += inputString[id]
	print(outstring)


for i in range(int(input())):
	line = input()
	n = 2
	x = [line[i:i + n] for i in range(0, len(line), n)]
	o = ''
	for i in range(len(x)):
		if i == 0:
			o += x[i]
		else:
			o += x[i][1]
	print(o)


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


def main():
	for _ in range(int(input())):
		s = input()
		n = len(s)
		ans = ''
		arr = []
		for i in range(0, n, 2):
			arr.append(s[i:i + 2])
		for i in range(0, n // 2):
			if i == n // 2 - 1:
				ans += arr[i]
			else:
				ans += arr[i][0]
		print(ans)
main()


inp = lambda : int(input())
inpm = lambda : map(int, input().split())
inpl = lambda : list(inpm())

def solve():
	s = input()
	n = len(s)
	x = s[0]
	for i in range(1, n - 1, 2):
		x += s[i]
	x += s[-1]
	print(x)

def main():
	t = inp()
	for i in range(t):
		solve()
main()


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
from collections import deque
for _ in range(int(input())):
	ans = []
	s = input()
	for i in range(0, len(s), 2):
		ans.append(s[i])
	ans.append(s[-1])
	print(''.join(ans))


t = int(input())
for i in range(t):
	s = list(input())
	j = 1
	while j < len(s) - 1:
		del s[j]
		j += 1
	print(''.join(s))


for _ in range(int(input())):
	n = input()
	if len(n) < 3:
		print(n)
	else:
		print(n[:2] + n[3::2])


t = int(input())
for _ in range(t):
	s = list(input())
	if len(s) == 2:
		print(''.join(s))
	else:
		res = []
		for (i, c) in enumerate(s):
			if not i & 1:
				res.append(c)
		print(''.join(res + [s[-1]]))


def orig(a):
	b = []
	l = len(a)
	i = 1
	b.append(a[0])
	while i < l - 1:
		b.append(s[i])
		i += 2
	b.append(a[l - 1])
	return b
t = int(input())
for i in range(t):
	s = str(input())
	print(*orig(s), sep='')


for _ in range(int(input())):
	a = input()
	if len(a) == 2:
		print(a)
	else:
		w = ''
		w += a[:2]
		for i in range(3, len(a), 2):
			w += a[i]
		print(w)


from collections import defaultdict, Counter
import copy, math
from copy import deepcopy
for _ in range(int(input())):
	n = input()
	s = ''
	for i in range(len(n)):
		if i % 2 == 0:
			s += n[i]
	print(s + n[-1])


test = int(input())
for i in range(test):
	s = input()
	flag = s[0]
	ans = s[0]
	cnt = 0
	for j in range(1, len(s)):
		cnt += 1
		if cnt % 2 == 0:
			ans += s[j]
		flag = s[j]
	ans += s[-1]
	print(ans)


total = int(input())
for _ in range(total):
	b = input().strip()
	last = b[-1]
	if len(b) == 2:
		print(b)
	else:
		new_string = b[::2] + last
		print(new_string)


t = int(input())
for _ in range(t):
	b = str(input())
	ans = []
	for i in range(len(b)):
		if i % 2 == 0:
			ans.append(b[i])
	ans.append(b[-1])
	print(''.join(ans))


t = int(input())
lis = []
l2 = []
for i in range(t):
	x = input()
	lis.append(x)
for j in lis:
	l1 = []
	li = list(j)
	l = len(li)
	l1.append(li[0])
	for i in range(l):
		if i % 2 != 0 and i != 0:
			l1.append(li[i])
	s1 = ''.join(l1)
	l2.append(s1)
for i in l2:
	print(i)


def calculate(string):
	newstring = ''
	for i in range(0, len(string)):
		if i % 2 == 0:
			newstring += string[i]
	newstring += string[len(string) - 1]
	print(newstring)
a = int(input())
for _ in range(a):
	calculate(input())


for _ in range(int(input())):
	b = str(input())
	ans = ''
	ans += b[0] + b[1]
	i = 3
	while i < len(b):
		ans += b[i]
		i += 2
	print(ans)


import re
for i in range(int(input())):
	a = input()
	b = ''
	for j in range(len(a)):
		if j == 0 or j == len(a) - 1:
			b = b + a[j]
		elif j % 2 == 0:
			b = b + a[j]
		else:
			c = 0
	print(b)


for i in range(int(input())):
	a = str(input())
	print(a[0], end='')
	for j in range(1, len(a) - 2, 2):
		print(a[j], end='')
	print(a[len(a) - 1])


t = input()
t = int(t)
while t > 0:
	b = str(input())
	if len(b) == 2:
		print(b)
	else:
		tar = 2
		a = ''
		for (i, val) in enumerate(b):
			if i == tar:
				tar += 2
			else:
				a += val
		print(a)
	t -= 1


def ints():
	return list(map(int, input().split()))
for _ in range(int(input())):
	a = input()
	n = len(a)
	ans = []
	ans.append(a[0])
	for i in range(1, n - 1):
		if i % 2 == 0:
			continue
		ans.append(a[i])
	ans.append(a[n - 1])
	print(''.join(ans))


def solve(s):
	ans = []
	for i in range(len(s)):
		if i == 0 or i == len(s) - 1:
			ans.append(s[i])
		elif i % 2 == 1:
			ans.append(s[i])
	return ''.join(ans)
n = int(input())
for i in range(n):
	s = input()
	print(solve(s))


for _ in range(int(input())):
	st = input()
	vr = ''
	vr = st[:2]
	i = 2
	while i <= len(st) - 2:
		vr = vr + st[i + 1]
		i = i + 2
	print(vr)


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


n = int(input())
for i in range(0, n):
	text = input()
	listy = ''
	lent = len(text)
	if lent == 2:
		print(text)
	else:
		for i in range(0, lent, 2):
			listy += text[i]
		listy += text[lent - 1]
		print(listy)


n = int(input())
arr = []
for i in range(n):
	arr.append(input())
for i in range(n):
	arr[i] = list(arr[i])
	x = len(arr[i])
	s = ''
	s = s + arr[i][0]
	for j in range(len(arr[i]) - 1):
		if j % 2 != 0:
			s = s + arr[i][j]
	s = s + arr[i][x - 1]
	print(s)


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


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


n = int(input())
for i in range(n):
	s = input()
	p = ''
	for i in range(0, len(s), 2):
		p += s[i]
	if not len(s) % 2:
		p += s[-1]
	print(p)


for _ in range(int(input())):
	s = input()
	s1 = ''
	for i in range(0, len(s) - 2, 2):
		s1 += s[i]
	s1 += s[len(s) - 2:len(s)]
	print(s1)


for _ in range(int(input())):
	b = input()
	s = []
	x = len(b) // 2
	i = 0
	while x > 0:
		s.append(b[i])
		if x == 1:
			s.append(b[i + 1])
		i += 2
		x -= 1
	str1 = ''
	for ele in s:
		str1 += ele
	print(str1)


a = int(input())
c = []
ob = []
for i in range(a):
	f = input()
	g = []
	for r in f:
		g.append(r)
	for i in range(2, len(g), 2):
		g[i] = ''
	j = []
	for t in g:
		if t != '':
			j.append(t)
	j = ''.join(j)
	ob.append(j)
for h in ob:
	print(h)


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


for i in range(int(input())):
	li = list(input())
	temp = len(li)
	if temp == 2:
		print(''.join(li))
		continue
	else:
		print(li[0], end='')
		for j in range((temp - 2) // 2):
			print(li[2 * j + 1], end='')
		print(li[-1], end='')
		print()


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


for _ in range(int(input())):
	result = []
	x = [i for i in input()]
	for i in range(0, len(x), 2):
		result.append(x[i])
	result.append(x[-1])
	print(''.join(result))


for t in range(int(input())):
	s = input()
	ansCI = s[0]
	ansCL = s[-1]
	ans = ''
	for c in range(1, len(s) - 2, 2):
		ans += s[c]
	ans = ansCI + ans + ansCL
	print(ans)


from itertools import combinations, tee

def pairwise(iterable):
	(a, b) = tee(iterable)
	next(b, None)
	return zip(a, b)

def a():
	b = input()
	pares = list(pairwise(b))
	a = ''
	for i in range(0, len(pares), 2):
		a += pares[i][0]
	a += b[-1]
	print(a)

def main():
	for _ in range(int(input())):
		a()
main()


t = int(input())
for _ in range(t):
	a = input()
	for i in range(0, len(a), 4):
		print(a[i:i + 2], end='')
	if len(a) % 4 == 0:
		print(a[-1])
	else:
		print()


n = int(input())
for j in range(n):
	S = str(input())
	h = len(S)
	D = S[0]
	u = 1
	while u <= h - 2:
		if S[u] == S[u + 1]:
			D = D + S[u]
			u = u + 2
		else:
			D = D + S[u]
			u += 1
	D = D + S[h - 1]
	print(D)


def solve():
	b = input()
	print(b[0:2] + b[3::2])
t = int(input())
while t > 0:
	solve()
	t = t - 1


import sys
input = sys.stdin.readline
INF = 10 ** 18
for _ in range(int(input())):
	b = input().rstrip('\n')
	a = b[0]
	for i in range(1, len(b) - 1, 2):
		a += b[i]
	a += b[-1]
	print(a)


for _ in range(int(input())):
	s = list(input())
	for i in range(len(s)):
		if not (i != 0 and i % 2 == 0):
			print(s[i], end='')
	print()


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		B = input().strip()
		ans = []
		for i in range(0, len(B), 2):
			ans.append(B[i])
		ans.append(B[-1])
		print(''.join(ans))
main()


def f(s):
	if len(s) <= 2:
		return s
	elif s[0] == s[1]:
		return s[0] + f(s[2:])
	else:
		return s
for i in range(int(input())):
	s = input()
	print(s[0] + f(s[1:]))


from collections import *
from bisect import *
from math import *
mod = 10 ** 9 + 7
for _ in range(int(input())):
	l = list(input())
	ans = l[:2]
	n = len(l)
	for i in range(3, n, 2):
		ans += l[i]
	print(''.join(ans))


n = input()
r = []
for i in range(int(n)):
	sub = []
	st = input()
	i = 0
	for j in st:
		if i % 2 == 0:
			sub.append(j)
		i = i + 1
	sub.append(st[i - 1])
	r.append(''.join(sub))
for i in range(int(n)):
	print(r[i])


t = int(input())
while t > 0:
	s = input()
	s1 = ''.join([s[x] for x in range(1, len(s), 2)])
	s1 = s[0] + s1
	print(s1)
	t = t - 1


for _ in range(int(input())):
	s = input()
	s = list(s)
	b = []
	i = 0
	n = len(s)
	while n > 0:
		j = s[i] + s[i + 1]
		b.append(j)
		i = i + 2
		n = n - 2
	m = len(b)
	c = []
	for i in range(m):
		if i != m - 1:
			l = b[i]
			l = list(l)
			c.append(l[0])
		else:
			c.append(b[m - 1])
	listToStr = ''.join(map(str, c))
	print(listToStr)


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


import sys
input = sys.stdin.readline

def solve(s):
	res = s[0:len(s) + 1:2]
	if len(s) % 2 == 0:
		res += s[-1]
	return res
t = int(input())
for _ in range(t):
	s = input().strip()
	print(solve(s))


for i in range(int(input())):
	a = input()
	l = []
	for i in range(len(a)):
		if i % 2 != 0:
			l.append(a[i])
		elif i == 0:
			l.append(a[i])
	print(*l, sep='')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import time, random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	t = I()
	sa = [S() for _ in range(t)]
	rr = []
	for s in sa:
		r = [s[0]]
		for i in range(1, len(s) - 1, 2):
			r.append(s[i])
		r.append(s[-1])
		rr.append(JA(r, ''))
	return JA(rr, '\n')
print(main())


for i in range(int(input())):
	n = input()
	n = list(n)
	a = ''
	a += n[0]
	a += n[1]
	for j in range(len(n)):
		if j > 2 and j % 2 == 1:
			a += n[j]
	print(a)


def expand(s):
	idx = 0
	out = []
	while idx < len(s) - 1:
		out.append(s[idx:idx + 2])
		idx += 1
	return ''.join(out)
expand('abac')
assert expand('abac') == 'abbaac'
assert expand('ac') == 'ac'
assert expand('bcdaf') == 'bccddaaf'
assert expand('zzzzzz') == 'zzzzzzzzzz'

def contract(s):
	if len(s) == 2:
		return s
	out = [s[idx] for idx in range(0, len(s)) if idx % 2 == 0]
	if len(s) % 2 == 0:
		out.append(s[-1])
	out = ''.join(out)
	assert expand(out) == s
	return out
assert contract('abbaac') == 'abac'
assert contract('ac') == 'ac'
assert contract('bccddaaf') == 'bcdaf'
assert contract('zzzzzzzzzz') == 'zzzzzz'

def main():
	T = int(input())
	for _ in range(T):
		s = input()
		print(contract(s))
main()


for _ in range(int(input())):
	s = input()
	n = len(s)
	ans = ''
	ans += s[0]
	f = True
	for i in range(n):
		if i >= 1 and i <= n - 2 and f:
			ans += s[i]
		f = not f
	ans += s[n - 1]
	print(ans)


n = int(input())
l = []
a = ''
for i in range(0, n):
	s = input()
	l.append(s)
for k in range(0, n):
	p = len(l[k])
	for j in range(0, p - 2):
		if j % 2 == 0:
			a += l[k][j]
		else:
			continue
	a += l[k][p - 2] + l[k][p - 1]
	print(a)
	a = ''


import sys
input = sys.stdin.readline

def main():
	for _ in range(int(input())):
		b = input().strip()
		print(b[:2], end='')
		for idx in range(3, len(b), 2):
			print(b[idx], end='')
		print('')
main()


t = int(input())
for j in range(t):
	tmp = ''
	temp = input()
	temp = temp + ' '
	count = 0
	i = 1
	tmp = temp[0]
	while i < len(temp) - 1:
		if temp[i] == temp[i + 1]:
			tmp = tmp + temp[i]
			i = i + 1
		else:
			tmp = tmp + temp[i]
		i += 1
	print(tmp)


t = int(input())
ans = []
for i in range(t):
	s = input()
	re = ''
	re += s[0]
	for j in range(1, len(s) - 1, 2):
		re += s[j]
	re += s[-1]
	ans.append(re)
for an in ans:
	print(an)


def main():
	T = int(input())
	for _ in range(T):
		S = input()
		if len(S) == 2:
			print(S)
		else:
			ans = S[0] + S[1]
			for i in range(4, len(S) + 1, 2):
				ans += S[i - 1]
			print(ans)
main()


test = int(input())
for t in range(0, test):
	b = input()
	n = len(b)
	a = ''
	for i in range(0, n):
		if i & 1 == 0 or i == n - 1:
			a += b[i]
	print(a)


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


a = int(input())
for j in range(a):
	s = input()
	l = len(s) - 2
	ss = s[0]
	for i in range(l):
		if i % 2 == 0:
			ss = ss + s[i + 2]
	ss = ss + s[-1]
	print(ss)


def subStr(b, n):
	if n <= 2:
		return b
	a = b[:2]
	for i in range(2, n):
		if i % 2 == 1:
			a += b[i]
	return a
t = int(input())
while t > 0:
	b = input()
	n = len(b)
	print(subStr(b, n))
	t -= 1


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():
	s = input()
	print(s[:2] + s[3::2])
for inytd in range(iinput()):
	main()


for _ in range(int(input())):
	s = input()
	s1 = s[0:2]
	l = len(s)
	for x in range(3, l, 2):
		s1 += s[x]
	print(s1)


n = int(input())
f = ''
b = 0
for i in range(n):
	n = input()
	if len(n) % 2 == 0:
		for j in range(len(n) // 2):
			if len(n) > 2:
				f += n[b]
				b += 2
			else:
				f += n[0]
		f += n[-1]
		print(f)
		b = 0
		f = ''


t = int(input())
for r in range(t):
	s = input()
	if len(s) <= 2:
		print(s)
		continue
	else:
		st = s[0]
		for i in range(1, len(s), 2):
			st = st + s[i]
		print(st)


n = int(input())
ar = []
for i in range(n):
	s = input()
	ar.append(s)
for a in ar:
	k = list(a)
	q = []
	q.append(k[0])
	q.append(k[1])
	if len(k) > 2:
		for i in range(2, len(k) - 1):
			if i % 2 != 0:
				q.append(k[i])
		q.append(k[len(k) - 1])
	r = ''.join([str(elem) for elem in q])
	print(r)


p = int(input())
for i in range(p):
	j = input()
	b = j[0:2]
	c = j[3:len(j):2]
	d = b + c
	print(d)


def getString(s):
	ans = s[0]
	n = len(s)
	for i in range(1, n - 1, 2):
		ans += s[i]
	ans += s[n - 1]
	return ans

def main():
	for _ in range(int(input())):
		s = str(input())
		print(getString(s))
main()


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)


import sys

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

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

def get_string():
	return sys.stdin.readline().strip()
t = int(input())
for test in range(t):
	s = get_string()
	ans = s[0]
	for i in range(1, len(s) - 1, 2):
		ans += s[i]
	ans += s[len(s) - 1]
	print(ans)


for _ in range(int(input())):
	arr = input()
	n = len(arr)
	if n == 2:
		print(arr)
	else:
		print(arr[0], end='')
		i = 1
		while i <= n:
			print(arr[i], end='')
			i += 2
	print()


t = int(input())
for case in range(t):
	b = input()
	a = ''
	for i in range(0, len(b), 2):
		a += b[i]
	a = ''.join([a, b[-1]])
	print(a)


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


t = int(input())
while t:
	st = input()
	print(st[::2] + st[len(st) - 1])
	t -= 1


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


import sys
t = int(input())
while t:
	t = t - 1
	b = input()
	a = b[0]
	for w in range(1, len(b), 2):
		a += b[w]
	print(a)


for i in range(int(input())):
	b = str(input())
	a = []
	a.append(b[0])
	a_last = b[-1]
	for c in range(len(b[1:-1])):
		if c % 2 != 0:
			a.append(b[c])
	a.append(a_last)
	print(''.join(a))


t = int(input())
for count in range(t):
	b = str(input())
	a = []
	for i in range(len(b)):
		if i == 0 or i == 1:
			a.append(b[i])
			continue
		if i % 2 != 0:
			a.append(b[i])
	for i in range(len(a)):
		print(a[i], end='')
	print()


t = int(input())
for i in range(t):
	s = input()
	b = ''
	for i in range(len(s)):
		if i == 0 or i == len(s) - 1:
			b = b[:] + s[i]
		elif i > 1 and i % 2 == 0:
			b = b[:] + s[i]
	print(b)


t = int(input())
for z in range(t):
	s = input()
	l = len(s)
	if l <= 2:
		print(s)
	else:
		str = ''
		i = 0
		while i < l:
			str = str + s[i]
			i = i + 2
		str = str + s[-1]
		print(str)


for test_case in range(int(input())):
	string = list(input())
	ans = ''
	for letter in range(0, len(string), 4):
		ans = ans + string[letter] + string[letter + 1]
	if len(string) % 4 == 0:
		ans += string[-1]
	print(ans)


t = int(input())
i = 0
while i < t:
	a = input()
	g = a[0] + a[1]
	for j in range(2, len(a), 2):
		g += a[j + 1]
	print(g)
	i += 1


for t in range(int(input())):
	b = input()
	print(b[:2] + b[3::2])


def find(a):
	li = list(a)
	li2 = []
	li2.append(li[0])
	if len(li) == 2:
		print(''.join(li))
	else:
		for i in range(1, len(li)):
			if i % 2 != 0:
				li2.append(li[i])
		print(''.join(li2))
n = int(input())
for i in range(0, n):
	a = str(input())
	find(a)


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


tcs = int(input())
for tc in range(tcs):
	s = input()
	l = len(s)
	if l == 2:
		print(s)
	else:
		if l % 2 == 1:
			s += ''
			l += 1
		ans = s[:2]
		for i in range(2, l, 2):
			if s[i:i + 2][0] != ans[-1]:
				ans += s[i:i + 2]
			else:
				ans += s[i + 1]
		print(ans.strip())


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


for t in range(int(input())):
	x = input()
	z = x[:2]
	for i in range(3, len(x), 2):
		z += x[i]
	print(z)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

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

def getStr():
	return input().strip()
t = getInt()
for _ in range(t):
	s = getStr()
	s1 = ''
	for i in range(len(s)):
		if i % 2 == 0:
			s1 += s[i]
	s1 += s[-1]
	print(s1)


try:
	t = int(input())
	for j in range(1, t + 1):
		mystr = str(input())
		finalstr = ''
		for i in range(0, len(mystr), 2):
			finalstr += mystr[i]
		finalstr += mystr[len(mystr) - 1]
		print(finalstr)
except:
	pass


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	s = input()
	ans = []
	for i in range(0, len(s), 2):
		ans += [s[i]]
	ans += [s[-1]]
	print(''.join(ans))


def read_int():
	return int(input())
t = read_int()
for case_num in range(t):
	b = input()
	l = len(b)
	a = [b[2 * i] for i in range(l // 2)]
	a.append(b[-1])
	print(''.join(a))


for _ in range(int(input().strip(' '))):
	a = input().strip(' ')
	b = ''
	i = 0
	while i < len(a) - 1:
		b += a[i]
		i += 2
	print(b + a[len(a) - 1])


for _ in range(int(input())):
	s = [i for i in input()]
	a = [s[i] for i in range(1, len(s) - 1) if i % 2 != 0]
	print(s[0], end='')
	print(''.join(a), end='')
	print(s[len(s) - 1])


import sys

def solve(b):
	cs = [b[i:i + 2] for i in range(0, len(b), 2)]
	for i in range(1, len(cs)):
		cs[i] = cs[i][1]
	return ''.join(cs)
IN = [x.strip() for x in sys.stdin.readlines()]
T = int(IN[0])
for ti in range(T):
	b = IN[1 + ti]
	result = solve(b)
	print(result)


import sys, math, cmath, time
start_time = time.time()

def solve():
	s = insr()
	a = ''
	for i in range(len(s)):
		if i % 2 == 0:
			a = a + s[i]
	print(a + s[-1])

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

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

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
	return q
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


n = int(input())
for i in range(n):
	b = list(input())
	a = ''.join([b[i] for i in range(0, len(b), 2)])
	a += b[len(b) - 1]
	print(a)


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	s = input().strip()
	ans = [s[0]]
	for i in range(1, len(s) - 1, 2):
		ans.append(s[i])
	ans.append(s[-1])
	print(''.join(map(str, ans)))
for _ in range(I()):
	solve()


l = list()
g = int(input())
for i in range(g):
	n = input()
	a = n[0]
	m = list(n[1:-1])
	e = n[-1]
	for i in range(0, len(m), 2):
		if m[i] == m[i + 1]:
			m.pop(i)
			m.insert(i, ' ')
	m = ''.join(m)
	m = m.replace(' ', '')
	l.append(a + m + e)
for i in l:
	print(i)


n = int(input())
for i in range(n):
	x = input()
	(chunks, chunk_size) = (len(x), 2)
	arr = [x[j:j + chunk_size] for j in range(0, chunks, 2)]
	a = ''
	for j in range(len(arr)):
		a += arr[j][0]
	a += arr[-1][1]
	print(a)


for i in range(int(input())):
	a = input()
	k = len(a)
	b = a[0]
	for i in range(1, k - 1):
		if i % 2 != 0:
			b = b + a[i]
	b = b + a[k - 1]
	print(b)


for i in range(int(input())):
	b = input()
	ans = []
	for i in range(0, len(b), 4):
		ans.append(b[i:i + 2])
	if len(b) % 4 == 0:
		ans.append(b[-1])
	print(*ans, sep='')


def driver():
	t = int(input())
	for i in range(t):
		solution()

def solution():
	n = input()
	if len(n) <= 2:
		print(n)
		return
	s = n[:1]
	for i in range(len(n)):
		if i % 2 == 1:
			s += n[i]
	print(s)
driver()


for _ in range(int(input())):
	s = input()
	n = len(s)
	for i in range(0, n - 1, 2):
		print(s[i], end='')
	if n % 2 == 0:
		print(s[-1])
	else:
		print(s[-2], s[-1], sep='')


for i in range(int(input())):
	b = list(input())
	for i in range(1, len(b) // 2):
		del b[i]
	print(''.join(b))


t = int(input())
for you in range(t):
	s = input()
	fifa = [s[0]]
	for i in range(1, len(s) - 1):
		if i % 2 == 1:
			fifa.append(s[i])
	fifa.append(s[-1])
	for i in fifa:
		print(i, end='')
	print()


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


def getOriginal(b):
	a = ''
	a += b[0]
	for i in range(1, len(b), 2):
		a += b[i]
	return a

def rmain():
	q = int(input())
	for i in range(q):
		b = input()
		print(getOriginal(b))
rmain()


test = int(input())
for _ in range(test):
	string = input()
	n = len(string)
	c = 0
	s = ''
	i = 1
	p = string[n - 2:n]
	while i < n - 2:
		if string[i - 1] != string[i]:
			s += string[i - 1]
			c = 0
		elif i == 1 and string[i - 1] == string[i]:
			s += string[i - 1]
		else:
			c += 1
		i += 1
		if c == 2:
			s += string[i]
			c = 0
	s += p
	print(s)


x = int(input())
l = []
for i in range(x):
	y = str(input())
	z = ''
	for j in range(len(y)):
		if j == 0:
			z = z + y[j]
		if j % 2 != 0:
			z = z + y[j]
	l.append(z)
for i in l:
	print(i)


t = int(input())
while t > 0:
	b = input()
	n = len(b)
	l = []
	for i in range(0, n, 2):
		l.append(b[i])
	l.append(b[n - 1])
	new_s = ''.join(l)
	print(new_s)
	t -= 1


for _ in range(int(input())):
	s = input()
	l = list(s)
	ans = []
	s1 = ''
	if len(l) <= 2:
		print(s)
	else:
		for i in range(len(l) - 1):
			if i % 2 == 0:
				ans.append(l[i])
		ans.append(l[len(l) - 1])
		s = s1.join(ans)
		print(s)


for _ in range(int(input())):
	s = input()
	if len(s) == 2:
		print(s)
		continue
	x = ''
	for i in range(0, len(s) - 2, 2):
		x += s[i]
	x += s[-2:]
	print(x)


t = int(input())
for _ in range(t):
	s = input()
	for j in range(0, len(s), 2):
		print(s[j], end='')
	if len(s) % 2 == 0:
		print(s[-1])


for _ in range(int(input())):
	str = input()
	l = len(str)
	s = []
	s.append(str[0])
	i = 1
	while i < l - 1:
		if str[i] == str[i + 1]:
			s.append(str[i])
			i = i + 2
	s.append(str[l - 1])
	str2 = ''.join(s)
	print(str2)


a = int(input())
for i in range(a):
	b = input()
	if len(b) == 1 or len(b) == 2:
		print(b)
	else:
		print(b[::2], end='')
		print(b[-1])


n = int(input())
for i in range(n):
	i = 0
	m = list(input())
	b = []
	b.append(m[0])
	b.append(m[1])
	m.remove(m[0])
	m.remove(m[0])
	while i < len(m):
		if i % 2 != 0:
			b.append(m[i])
		i = i + 1
	ch = ''
	b = ch.join(b)
	print(b)
	b = list(b)
	b.clear()


for _ in range(int(input())):
	s = list(input())
	a = ''
	n = len(s)
	a += s[0]
	for i in range(1, n - 1, 2):
		a += s[i]
	a += s[n - 1]
	print(a)


for z in range(int(input())):
	s = input()
	i = 0
	l = len(s) - 1
	lst = []
	while i <= l:
		if i <= l - 1 and s[i] == s[i + 1]:
			lst.append(s[i])
			i += 2
		else:
			lst.append(s[i])
			i += 1
	if s.count(s[0]) == l + 1:
		lst.append(s[0])
	print(''.join((str(x) for x in lst)))


def Solve(str):
	if len(str) == 2:
		return str
	r = ''
	ss = str[1:len(str) - 1]
	for i in range(0, len(ss), 2):
		r += ss[i]
	r += str[-1]
	r = str[0] + r
	return r
T = int(input())
for i in range(T):
	str = input()
	print(Solve(str))


t = int(input())
for q in range(t):
	s = input()
	last = ''
	rst = ''
	count = 0
	rst += s[0]
	rst += s[1]
	for x in range(3, len(s), 2):
		rst += s[x]
	print(rst)


import sys
input = sys.stdin.readline

def main():
	s = input().strip()
	l = len(s)
	ans = ''
	for i in range(0, l, 2):
		ans += s[i]
	ans += s[-1]
	print(ans)
for _ in range(int(input())):
	main()


for _ in range(int(input())):
	l = list(input())
	s = l[1:-2:2]
	print(l[0], ''.join(s), l[-1], sep='')


t = int(input())
while t > 0:
	s = input()
	s = s[0] + ''.join(list(s[1::2]))
	print(s)
	t -= 1


def get_ans(st):
	ls = st[-1]
	ans = ''
	st = st[:-1]
	for i in range(len(st)):
		if i % 2 == 0:
			ans = ans + st[i]
	ans = ans + ls
	return ans
t = int(input())
anss = []
for _ in range(t):
	anss.append(get_ans(input()))
for i in anss:
	print(i)


t = int(input())
for k in range(t):
	s = input()
	a = [str(x) for x in str(s)]
	l = len(a)
	for i in range(0, l - 1, 2):
		print(a[i], end='')
	print(a[l - 1])


try:
	t = int(input())
	for _ in range(t):
		string = input()
		string = list(string)
		it = 0
		print()
		while it < len(string):
			print(string[it], end='')
			it += 2
		print(string[-1], end='')
except EOFError as e:
	pass


def solve():
	a = input()
	print(a[0], end='')
	for i in range(1, len(a) - 1):
		if i % 2:
			print(a[i], end='')
	print(a[-1], end='')
	print()

def main():
	for i in range(int(input())):
		solve()
main()


for _ in range(int(input())):
	s = input()
	x = ''
	d = s[0]
	x = x + d
	i = 1
	while i < len(s) - 1:
		d = s[i]
		x = x + d
		i = i + 2
	d = s[-1]
	x = x + d
	print(x)


t = int(input())
for _ in range(t):
	s = input()
	first = s[0]
	last = s[-1]
	mid = [s[i] for i in range(1, len(s) - 1, 2)]
	print(first + ''.join(mid) + last)


for _ in range(int(input())):
	a = input()
	b = a[0]
	flag = True
	n = len(a)
	for i in range(1, n):
		if i != n - 1 and flag and (a[i] == a[i - 1]):
			flag = False
			continue
		b += a[i]
		flag = True
	print(b)


def main(s):
	n = len(s)
	if n == 2:
		return s
	res = ''
	for i in range(0, n, 2):
		res += s[i]
	res += s[-1]
	return res
k = int(input())
for _ in range(k):
	s = str(input())
	print(main(s))


import math
n = int(input())
for q in range(n):
	s = input()
	ans = ''
	for i in range(len(s)):
		if i == 0 or i == len(s) - 1 or i % 2 != 0:
			ans += s[i]
	ams = ''.join(ans)
	print(ans)