Problem Description

You have a dictionary of balances. Commands: ADD name x, SUB name x, GET name. Missing name starts at 0. For GET, output current balance.

Input Format

First line q. Next q lines commands.

Output Format

Outputs for GET commands.

Sample Test Case

Input:
6 ADD a 10 ADD b 5 SUB a 3 GET a GET c GET b
Output:
7 0 5

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next