J. Jane's Party Salad
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

As part of her birthday festivities, Jane has decided to cook for all her friends and invite them to a party. For the appetizer, Jane will prepare a salad, and she has decided to make the salad by adding exactly $$$K$$$ different ingredients from the $$$N$$$ ingredients she has available in her pantry. However, Jane's friends, who have been invited to the party, have certain preferences, and each one has told Jane that they will not attend the party if the salad contains any of the ingredients they dislike.

Jane wouldn't want her friends to miss the party as she has already bought a huge cake to share with everyone. However, she won't change her decision to use $$$K$$$ ingredients in her salad. That's why Jane has asked each of her friends for a list of ingredients they don't like. With this information, Jane wants to choose the $$$K$$$ ingredients in a way that maximizes the number of friends attending the party. However, there are many combinations to consider!. Therefore, knowing your programming skills she asked for your help in determining the maximum number of friends that will attend the party, given the number of ingredients Jane has in her pantry, the number of different ingredients she wants to include in the salad, and the list of ingredients that each of her friends dislikes.

Input

The first line of input contains three integer numbers separated by a space $$$N$$$ ($$$1 \leq N \leq 50$$$), $$$K$$$ ($$$1 \leq K \leq N$$$), $$$F$$$ ($$$1 \leq F \leq 20$$$), representing the number $$$N$$$ of ingredients in Jane's pantry, the number $$$K$$$ of different ingredients Jane wants to put in the salad, and the number of $$$F$$$ friends invited to the party. Ingredients are indentified with numbers from $$$1$$$ to $$$N$$$. Each of the following $$$F$$$ lines start with an integer number $$$f_i$$$ ($$$0 \leq f_i \leq N$$$), representing the number of ingredients the $$$i$$$-th friend has in the list followed by $$$f_i$$$ numbers separated by a space, representing the ingredients that the $$$i$$$-th friend has in his dislike list. Each number in the list will be between $$$1$$$ and $$$N$$$, and no two of numbers in the friend list will be the same.

Output

Output a line with a single integer, the maximum number of friends that can attend Jane's party.

Examples
Input
4 2 5
2 1 2
2 1 4
2 3 2
1 4
1 1
Output
3
Input
2 2 3
0
1 1
1 2
Output
1