R=range J=lambda:list(map(int,input().split())) N,*_=J() F=J() F.reverse() def acc(f,i):return f[i]if 0<=i