friends play LOL together. Everyone should BAN one character and PICK one character. The enemy should BAN characters and PICK characters. All these heroes must be different.
Everyone can BAN any heroes by their personal wishes. But they can only PICK heroes which they have bought.
Suppose the enemy can PICK or BAN any heroes. How many different ways are there satisfying the conditions?
For example, a valid way is:
Player : picks hero , bans hero
Player : picks hero , bans hero
Player : picks hero , bans hero
Player : picks hero , bans hero
Player : picks hero , bans hero
Enemies pick heroes , ban heroes .
输入格式
The input contains multiple test cases (no more than ).
In each test case, there are strings , respectively whose lengths are . For the -th person, if he has bought the -th hero, the -th character of is '', or '' if not. The total number of heroes is exactly .
输出格式
For each test case, print the answer mod in a single line.