You are given a list of API call strings, each prefixed with a sequential request_id. There are 5–6 request types: 1. REGISTER (user_id, initial_balance) — sign up a new user with an initial balance 2. FRIEND_REQUEST (user1, user2) — user1 sends a friend request to user2; the request is tracked…