AT_abc392_d [ABC392D] Doubles

Description

There are $ N $ dice. The $ i $ -th die has $ K_i $ faces, with the numbers $ A_{i,1}, A_{i,2}, \ldots, A_{i,K_i} $ written on them. When you roll this die, each face appears with probability $ \frac{1}{K_i} $ . You choose two dice from the $ N $ dice and roll them. Determine the maximum probability that the two dice show the same number, when the dice are chosen optimally.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ K_1 $ $ A_{1,1} $ $ A_{1,2} $ $ \dots $ $ A_{1,K_1} $ $ \vdots $ $ K_N $ $ A_{N,1} $ $ A_{N,2} $ $ \dots $ $ A_{N,K_N} $

Output Format

Print the answer. Your answer is considered correct if the absolute or relative error from the true solution does not exceed $ 10^{-8} $ .

Explanation/Hint

### Sample Explanation 1 - When choosing the 1st and 2nd dice, the probability that the outcomes are the same is $ \frac{1}{3} $ . - When choosing the 1st and 3rd dice, the probability is $ \frac{1}{6} $ . - When choosing the 2nd and 3rd dice, the probability is $ \frac{1}{6} $ . Therefore, the maximum probability is $ \frac{1}{3} = 0.3333333333\ldots $ . ### Constraints - $ 2 \leq N \leq 100 $ - $ 1 \leq K_i $ - $ K_1 + K_2 + \dots + K_N \leq 10^5 $ - $ 1 \leq A_{i,j} \leq 10^5 $ - All input values are integers.