Robot bounded circle

Write codeMedium20 minAmazon style

Your task

A robot starts at the origin (0,0) of an infinite 2D grid facing north and executes a command string consisting of 'G' (move forward one unit), 'L' (turn left 90 degrees), and 'R' (turn right 90 degrees). The robot repeats the whole instruction sequence forever. Return True if and only if there exists some circle (of finite radius) that the robot can never escape, i.e. its trajectory is bounded. The instruction string has length 1..100.

Examples

is_robot_bounded(instructions: str) -> bool
Example 1
Inputis_robot_bounded("GGLLGG")
OutputTrue