Alice get M sequences ordered from 1 to M. Now she rearrange the M sequences and connect them from left to right to get a new sequence. And she wanna know the sum of great common divisores of all different interval of the result sequence. She define the sum as beautiful value but it's not the answer. We can easy know there are M! different rearrangements. She want to calculate the sum of beautiful value of all rearragements. It's too difficult. So help her please. Output the answer mod 1000000007.
输入解释
The input contains multiple test cases.
For each test case, the first line contains one integer $M(1\leq M\leq 80000)$. Then followed M lines. Each line start with a integer $S(1\leq S\leq 80000)$, then followed S integers. The sum of S is not big than 80000. All integers are between 1 and 80000.
输出解释
For each test case, output the answer mod 1000000007.