cities = list(input().split())
print(f'Всего городов введено: {len(cities)}')
ans = []
for i in range(len(cities)):
if i % 2 == 0:
ans.append(cities[i])
print(*ans)
cities = list(input().split())
print(f'Всего городов введено: {len(cities)}')
ans = []
for i in range(len(cities)):
if i % 2 == 0:
ans.append(cities[i])
print(*ans)