Determine the number of distinct numbers that appear in at least one of the given sets.
The first line contains an integer (1 \le n \le 10) — the number of sets.
The next lines describe the sets. Each line begins with (1 \le k \le 1000) — the number of elements in the set. Then integers follow: a_1, \ldots, 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.
Пример 1
Пример 2