import sys; input = sys.stdin.readline N, K, M = map(int, input().split()); F = {chr(x):set() for x in range(65, 91)}; Z = 0 for i in range(N): for f in input().strip(): F[f].add(1<