on infinite plane robot initially stand 0 0 face north Note thatthe north direction positive direction yaxisthe south direction negative direction yaxisthe east direction positive direction xaxisThe west direction negative direction xaxisthe robot receive instructionsg straight 1 unitL turn 90 degree leave ie anticlockwise directionR turn 90 degree right ie clockwise directionthe robot perform instruction give order repeat foreverreturn true exist circle plane robot leave circle Example 1input instruction GGLLGGOutput trueexplanation the robot initially 0 0 face north directionG step position 0 1 direction NorthG step position 0 2 direction NorthL turn 90 degree anticlockwise position 0 2 direction WestL turn 90 degree anticlockwise position 0 2 direction southg step position 0 1 direction southg step position 0 0 Direction SouthRepeating instruction robot go cycle 0 0 0 1 0 2 0 1 0 0based return trueexample 2input instruction ggoutput falseexplanation the robot initially 0 0 face north directionG step position 0 1 direction NorthG step position 0 2 direction NorthRepeating instruction keep advance north direction cyclesbase return falseexample 3input instruction gloutput trueexplanation the robot initially 0 0 face north directionG step position 0 1 direction NorthL turn 90 degree anticlockwise position 0 1 Direction WestG step position 1 1 Direction WestL turn 90 degree anticlockwise position 1 1 direction southg step position 1 0 direction southl turn 90 degree anticlockwise position 1 0 Direction EastG step position 0 0 Direction EastL turn 90 degree anticlockwise position 0 0 Direction NorthRepeating instruction robot go cycle 0 0 0 1 1 1 1 0 0 0base return true Constraints1 instructionslength 100instructionsi G L R