newton/solutions/1367A.py

15 lines
299 B
Python
Raw Normal View History

2025-01-11 11:41:29 +00:00
t = int(input())
for _ in range(t):
b = list(input())
original = b[:]
b.pop(0)
b.pop(len(b)-1)
copied = []
for idx, i in enumerate(b):
if idx % 2 == 0:
copied.append(i)
print(f"{original[0]}{''.join(c for c in copied)}{original[len(original)-1]}")