Emoticons are often used in chats and emails to express feelings that words alone cannot capture. They are handy in many ways, but plenty of people find them extremely annoying and would love to get rid of them.
Sejong is exactly that kind of person. He hates emoticons so much that he has decided to erase every emoticon from all the emails in the world, and he wants you to build a special program to help him.
The program first receives a list of emoticons to remove. Each emoticon is a string that contains no whitespace. It then receives some text. The program's job is to replace some characters of the text with spaces so that every emoticon that originally appeared is destroyed. An emoticon is considered to appear in the text only when its characters show up consecutively within a single line; if any whitespace or other character is inserted between the emoticon's characters, it does not count as an emoticon.
To keep Sejong's plan as inconspicuous as possible, you must minimize the number of characters replaced with spaces.
The input consists of several test cases.
The first line of each test case contains the number of emoticons $N$ and the number of text lines $M$. The next $N$ lines each contain one non-empty emoticon of length at most $15$. The following $M$ lines contain the text from which emoticons must be removed; each line is at most $80$ characters long. You may assume $1 \le N, M \le 100$.
An emoticon may consist only of uppercase and lowercase English letters, digits, and the special characters !?.,:;-_'#$%&/=*+(){}[] (the double quote is not included). The text may additionally contain whitespace characters.
The input ends with a line containing $N = M = 0$.
For each test case, print on a single line the minimum number of characters that must be replaced with spaces in order to remove every emoticon from all of that test case's text.