parts = input().split() print(*parts[:2], *reversed(parts[2:-2]), *parts[-2:])