Author: | G.Korneev, A. Klenin | Time limit: | 1 sec | |
Input file: | input.txt | Memory limit: | 256 Mb | |
Output file: | output.txt |
A company wants to name a new product. Marketing department determined, that a name for a product is appropriate, if:
Your program must calculate the number of possible appropriate names. Note that English vowels are: 'a', 'e', 'i', 'o', 'u', 'y'.
First line of input file contains two integers NM — name length and number of offensive substrings.
Following M lines contain offensive substrings si, one per line.
Output file must contain a single integer — number of appropriate names modulo 109+7.
1≤N≤50, 0≤M≤50, 1≤length(si)≤N.
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
2 |
|
|