The first line of input contains NN and KK separated by a space.
The following N lines contain a description of the different microcontroller models available for ea
ch location. The iith such line starts with MiMi (1≤Mi≤10), giving the number of models available
for location ii. This is followed by MiMi space separated integers Pi,jPi,j giving the costs of thes
e different models (1≤Pi,j≤100,000,000).