(lambda n,List,k:print(*[max(List[i*k:i*k+k])for i in range(n//k)]))(int(input()),list(map(int,input().split())),int(input()))
(lambda n,List,k:print(*[max(List[i*k:i*k+k])for i in range(n//k)]))(int(input()),list(map(int,input().split())),int(input()))
Post a Comment