import sys from operator import itemgetter read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(readline()) S = read().split() M, x, d = map(int, S[-3:]) inds, words = zip(*sorted(enumerate(S[:-3], 1), key=itemgetter(1))) re_index = [0] * (N+1) for i,x in enumerate(inds): re_index[x] = i