Grouping Points by nearby points

Hello, this is the solution