The first line contains the numbers of strings N and M (1≤N≤10,000, 1≤M≤10,000).
Each of the next N lines contains one string of the set S.
Each of the next M lines contains one string to check.
Every string in the input consists only of lowercase English letters, and its length does not exceed 500. The set S never contains the same string twice.