Vint Cerf and Bob Kahn, curious about the users of their network, decide to invite them all to a barbecue. Judging by the amount of traffic on the network, they are going to need a lot of food.
You are given the grocery store's inventory and their grocery list. The store's club card lets them buy some items at a cheaper price. Determine how much money they save in total by using the club card.
For each item on the grocery list, if the store carries it, they save (normal price - club price) on every unit they actually buy. The number of units bought is the smaller of the quantity desired $m_j$ and the quantity in stock $n_i$. In other words, the amount saved on that item is $\min(m_j, n_i) \times (p_i - c_i)$. An item on the list that the store does not carry cannot be bought and contributes nothing. The total saving is the sum over all items.
The first line contains the number $K$ of data sets. Then $K$ data sets follow, each in the form below.
The first line of each data set contains two integers $N$ and $M$ ($1 \le N, M \le 100$), where $N$ is the number of different items in the store and $M$ is the number of different items on the grocery list.
Then $N$ lines follow, each describing one store item: an integer $n_i$ (the quantity currently in stock), then the normal price $p_i$ and the club card price $c_i$, then a single space followed by the item name $s_i$. Prices range from $0.00 to $99.99 and are always written with two decimal places (for example, $3.00). A name may contain upper- and lower-case letters and spaces.
Then $M$ lines follow, each describing one item on the list: an integer $m_j$ (the quantity desired), then a single space followed by the item name $s_j$.
An item on the list is the same as a store item if their names are equal, ignoring case. The names in the input have no extra leading or trailing whitespace.
For each data set, output Data Set x: on a line by itself, where $x$ is the data set's number. On the next line, output the exact amount saved by using the club card, written with a leading $ and two decimal places (no commas). Separate consecutive data sets with a blank line.