Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

A social network app tracks user registration, friendships, and money transfers using a sequence of API request pairs. Each request is represented as a pair [<sequenceNumber>, <requestString>]:

  • The first value, sequenceNumber, is a unique string identifier for that request (such as "1", "2", ...).

  • The second value, requestString, describes the action and is formatted as one of the following:

    • "REGISTER: "v1/REGISTER/{user}/{initialBalance}" Registers a new user user with an initial balance of initialBalance.

    • "FRIEND_REQUEST": "v1/FRIEND_REQUEST/{fromUser}/{toUser}" Sends a pending friend request from fromUser to toUser. Store the request using its sequenceNumber.

Test Cases
Input
Output
Expected