Rahaduzzaman Setu, (Roll - 12) of 13th batch, CSE, University of Dhaka. He passed away on 18th April 2012. May he rest in peace. This problem is dedicated to him. This problem was written during his treatment. He will be in our prayers, always.
In this problem, you have to build a software that can calculate donations. Initially the total amount of money is 0 and in each time, two types of operations will be there:
donate K
(100 ≤ K ≤ 105), then you have to add K to the account.report
, report all the money currently in the account.
Input
Input starts with an integer T (≤ 100), denoting the number of test cases.
Each case starts with a line containing an integer N (1 ≤ N ≤ 100) denoting the number of operations. Then there will be N lines each containing two types of operations as given.
You may assume that the input follows the restrictions above. Initially the account is empty for each case.
Output
For each case, print the case number in a single line. Then for each report
operation, print the total amount of money in the account in a single line.
Sample
Sample Input | Sample Output |
---|---|
2 4 donate 1000 report donate 500 report 2 donate 10000 report | Case 1: 1000 1500 Case 2: 10000 |