Label
During archaeological research, fascinating discoveries are sometimes made. For instance, while excavating an ancient civilization's settlement, it was found that its people, much like us today, drank beverages from bottles with labels detailing the contents. Remarkably, one such label has survived to this day. However, scientists attempting to decipher it have encountered an intriguing challenge.
The issue is that this civilization did not use hyphens. When a line ended, reading simply continued onto the next line. This wasn't a problem for deciphering books, but a label differs significantly from a book — it was wrapped around a bottle, forming a solid cylinder with text encircling it. To read the text, one must begin at the adhesion point on the first line, then proceed to the second line upon reaching the adhesion point, and continue in this manner. Unfortunately, the scientists have yet to determine where the label was adhered! Thus, instead of coherent text, there is currently only a set of lines of equal length k, composed of letters and the symbol "", which this civilization used in place of spaces.
Fortunately, along with the label, there is a dictionary containing all possible words used by this civilization. Based on this information, you need to determine how many potential adhesion points exist. More formally, you need to find how many non-negative values of t < k exist such that the concatenation of all the given lines, cyclically shifted left by t characters, forms a sequence of words from the dictionary, separated by one or more "" symbols. Additionally, you need to list all these values of t.
Input
The first line contains one integer m (1 ≤ m ≤ 2000) — the number of words in the dictionary. The following m lines contain the words from the dictionary. All words are unique, consist only of lowercase Latin letters, and each word's length does not exceed 2000 characters.
The next line contains one integer n (1 ≤ n ≤ 2000) — the number of lines written on the label. The subsequent n lines contain the words of the line written on the label. All these lines consist only of lowercase Latin letters and "" symbols. The length of all lines is the same and does not exceed 2000 characters. It is guaranteed that each line contains at least one "" symbol.
Output
On the first line, output one integer — the number of values t. On the next line, output these values, separated by spaces and sorted in ascending order.