A locker room tracks which locker ids are currently registered as in use. Starting from an empty registry, it processes q operations, each one of:
ADD x— register locker idx. If it is already registered, nothing changes.REMOVE x— unregister locker idx. If it is not registered, nothing changes.HAS x— report whether locker idxis currently registered.
Input format
Line 1: an integer q.
Next q lines: one operation each.
Output format
For every HAS operation, in order, print 1 if the id is currently registered, otherwise 0.
Constraints
- 1 <= q <= 40
- 0 <= x <= 1000000