Word Game#2410

Word Game

1 second
64 megabytes
Easy

Two players play the following game:

The first player thinks of a word and tells the second player its length. The second player tries to guess the word by naming words G_i of the same length. For each guessed word, the first player answers whether the number of positions where the letters in G_i coincide with the word in the same places is even or odd. This continues until the second player can exactly name the word thought of by the first player.

Given the guessed words G_i and the answers for them, determine what the word might be.

In this problem, a "word" is any sequence of uppercase Latin letters.

Input

The first line contains two non-negative integers and — the number of guessed words for which the number of coincidences is even and the number for which it is odd. The total number 1 \leq N + M \leq 64.

The second line contains words of equal length, consisting of uppercase Latin letters — these are the words for which the number of coincidences is even.

The third line contains words of equal length, consisting of uppercase Latin letters — these are the words for which the number of coincidences is odd.

The lengths of the words in both lines are the same and range from to characters, inclusive. It is also guaranteed that the number of possible words in each test does not exceed .

Output

In the first line, print the number — the number of different words that the first player could have thought of. In the second line, print all these words in lexicographical order separated by spaces. The words must consist of uppercase Latin letters.

Examples

Example 1

Loading
Loading