The eastern sultan has so many gems that he cannot count them. Therefore, he asked players from around the world to help him in the online game Sultan Match. To correctly calculate diamonds and other jewels, you need to sort them. Find three jewels of the same shape and color on the field, connect them with one line. To pass the level, you need to collect a certain number of treasures.