# 830

class Solution:
    def position_of_large_groups(self, chars):
        result, start = [], 0

        for i in range(len(chars)):
            if i == len(chars) - 1 or chars[i] != chars[i + 1]:
                if i - start + 1 >= 3:
                    result.append([start, i])
                
                start = i + 1
        
        return result



chars = "abcdddeeeeaabbbcd"
solution = Solution()
print(solution.position_of_large_groups(chars))