The first line contains the number of scenarios. Scenarios are implicitly numbered starting from 1. For each scenario there are three tables:
1. Angelo's recipe book.
2. A table of ingredients.
3. A table of cocktail orders.
The recipe book consists of:
- One line with the total number of cocktails in the book.
- Following it, for each cocktail two lines:
- The first line contains the name of the cocktail and the number of different ingredients.
- The second line contains the ingredient names and their amounts in centi-liters separated by blanks.
The table of ingredients consists of:
- One line containing the number of available ingredients.
- For each ingredient a line containing the name, the available amount of that ingredient in centi-liters and the price in Lira per centi-liter.
Finally, the table of cocktail orders consists of:
- One line containing the number of orders.
- For each order the name of the cocktail.
Names of cocktails and ingredients are strings containing only alphanumeric characters or underscores (no whitespace). All values are integer values smaller which are at most 10000.