Determine the number of distinct numbers that appear in at least one of the given sets.
The first line contains an integer n~(1 \le n \le 10) — the number of sets.
The next lines each describe one set: first, the number k~(1 \le k \le 1000) is given — the number of elements in the set, followed by integers a_1~...~a_k~(−10^9 \le a_i \le 10^9) — the elements of the set.
Output a single number — the number of distinct elements that appear in at least one of the sets.
Example 1
Example 2