N,K,T=map(int,input().split()) a=list(map(str,input().split())) b=list(map(int,input().split())) c=[-1 for _ in range(N)] T%=(2*K) for i in range(N): if a[i]=='A': c[i]=2*K-b[i] else: c[i]=b[i] c[i]+=T c[i]%=2*K if c[i]>K: c[i]=2*K-c[i] print(*c)