N, M, X, Y = map(int, input().split()) A = list(map(int, input().split())) x = [i for i in A if i >= X] L = len(x) S = sum(x) print(x) if L >= M: print('Handicapped') else: print(A) z = [j for j in A if j < X and j > Y] print(z) l = len(z) if l + L <= M: print(sum(z)+S) else: print(sum(sorted(z)[(l+L-M):])+S)