Problem Description

You have two variables a and b starting at 0. You get q commands: SETA x, SETB x, ADDA x, ADDB x, SWAP. Output final a and b.

Input Format

First line q. Next q lines commands.

Output Format

One line: a b.

Sample Test Case

Input:
5 SETA 5 SETB 2 ADDA 3 SWAP ADDB 10
Output:
2 18

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next