Max owns a successful pizza store and is now planning to open a new bakery. He needs your help to build a new inventory management system to meet his needs.
You are given two types of information about the inventory:
Restock Information: This information starts with the keyword "restock", followed by the ingredient title and the quantity separated by a whitespace. Restock will increase the amount of the ingerdient in the storehouse.
Record Information: This information starts with the keyword "record", followed by the product title and the quantity separated by a whitespace. Record would consume the amount of the ingredient to make the product.
There are 4 types of products in this bakery, and each product requires a specific amount of ingredients, as shown in the table below:
Your task is to calculate the remaining quantity of each ingredient in the storehouse based on the restock and record information. Then output the final inventory at the end. If the remaining quantity of an ingredient is zero, it should not be included in the output.
The input consists of multiple lines of text. Each line contains either the restock information or the product record information.
The output should contain the remaining quantity of each ingredient in the warehouse. The remaining quantities should be displayed in lowercase and sorted in alphabetical order. The quantity should have one decimal place (rounded down). If the remaining quantity of an ingredient is zero, it should not be included in the output.