Problem:

There are 15 hunters in one locality. Teams of 3 people are formed between them, so that in

during the 7 days of the hunt, no participant should be with any of those with

who has been on the team before. Determine the composition of the teams for the 7 days.

Can someone give me an idea of ​​how I could solve it?
Code:
#include <iostream>
int n, p, v[20];
...