https://medium.com/@eyajamuehaque/265a-colorful-stones-simplified-edition-codeforces-solution-in-c-58d71eb27c53