N = int(input()) A,B,C = map(int,input().split()) SS = input().split() L = [] for s in SS: L.append(len(s)) ans=0 for i in range(N+1): f=0 j=i while j