Problem Description

Commands: SET name value, PRINT name. Count how many PRINT happen before a name is ever SET.

Input Format

First line q. Next q lines.

Output Format

One integer count.

Sample Test Case

Input:
6 PRINT a SET a 1 PRINT a PRINT b SET b 2 PRINT b
Output:
2

Constraints

q

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next