n = int(input().strip()) nums = list(map(int,input().strip().split())) t = 0 res = [] while t<=n-1: res.append(nums[t]) t=t*2+1 for i in range((t-1)//2+1,n): res.append(nums[i]) t = (t-1)//2 for i in range((n-1)//2,t-1): res.append(nums[i]) while t>0: res.append(nums[t-1]) ...