from collections import defaultdict N,M,C = map(int,input().split()) A = list(map(int,input().split())) A.sort() S = sum(A) DP = [defaultdict(int) for _ in range(C+1)] DP[0][0] = 1 for i in range(N): DP2 = [defaultdict(int) for _ in range(C+1)] for j in range(C+1): for k,v in DP[j].items(): if j < C: DP2[j+1][k+A[i]] += v DP2[j+1][k+A[i]] %= M DP2[j][k] += v DP2[j][k] %= M DP = DP2 print(*[DP[C][i] for i in range(1,S+1)])