n, s, k = map(int, input().split()) u = s + k l = s - k ans =[] for i in range(n): a = int(input()) if abs(s - a) <= k: ans.append([i+1, a]) ans.sort() if len(ans) == 0: print("unlucky!") else: for i, a in ans: print(i) break