Gangho's company has N employees and M jobs to finish. Employees are numbered 1 to N, and jobs are numbered 1 to M.
Each employee takes one job out of the jobs that employee can do, and each job is taken by one employee. K of the N employees can take up to two jobs.
Given the list of jobs each employee can do, write a program that finds the largest number of the M jobs the company can finish.
The first line contains the number of employees N, the number of jobs M, and the number of employees who can take two jobs K. (1≤N,M≤1000, 1≤K≤N)
Each of the next N lines describes one employee. The i-th line contains the number of jobs employee i can do, followed by the numbers of those jobs.
Print the largest number of jobs Gangho's company can finish.
In the first example, employee 1 takes two jobs. Employee 1 takes jobs 1 and 2, employee 2 takes job 3, and employee 3 takes job 5, so four jobs are finished.