simply follow the instructions
Intuition\n Describe your first thoughts on how to solve this problem. \nsimulate the instructions\n\n# Approach\n Describe your approach to solving the problem
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nsimulate the instructions\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def executeInstructions(self, n: int, startPos: List[int], s: str) -> List[int]:\n        i = 0\n        final = []\n        xbound, ybound = n, n\n        while i < len(s):\n            moves = 0\n            startx, starty = startPos[0], startPos[1]\n            for j in range(i, len(s)):\n                if s[j] == \'R\':\n                    starty += 1\n                elif s[j] == \'D\':\n                    startx += 1\n                elif s[j] == \'U\':\n                    startx -= 1\n                elif s[j] == \'L\':\n                    starty -= 1\n                if startx >= 0 and startx < n and starty >= 0 and starty < n:\n                    moves += 1\n                if startx < 0 or startx >= n or starty < 0 or starty >= n:\n                    break \n\n\n\n            i += 1\n            print("HHHHH")\n            final.append(moves)\n        return final\n\n        \n\n\n\n```
['Python3']