a robot infinite XYplane start point 0 0 face north the robot receive sequence possible type commands2 turn leave 90 degrees1 turn right 90 degrees1 k 9 move forward k unit unit timeSome grid square obstacle the ith obstacle grid point obstaclesi xi yi if robot run obstacle instead stay current location commandreturn maximum euclidean distance robot get origin square ie distance 5 return 25notenorth mean Y directioneast mean X directionsouth mean Y directionwest mean x direction Example 1input command 413 obstacle output 25explanation the robot start 0 01 move north 4 unit 0 42 turn right3 move east 3 unit 3 4the furthest point robot get origin 3 4 square 32 42 25 unit awayexample 2input command 41424 obstacle 24output 65explanation the robot start 0 01 move north 4 unit 0 42 turn right3 move east 1 unit block obstacle 2 4 robot 1 44 Turn left5 move north 4 unit 1 8the furthest point robot get origin 1 8 square 12 82 65 unit awayexample 3input command 6116 obstacle output 36explanation the robot start 0 01 move north 6 unit 0 62 turn right3 turn right4 move south 6 unit 0 0the furth point robot get origin 0 6 square 62 36 unit away Constraints1 commandslength 104commandsi 2 1 integer range 1 90 obstacleslength 1043 104 xi yi 3 104the answer guarantee 231