grc's Triangles solution