Define two sets of territories below: "Base" territories & "Neighbor" territories. For every "Base" territory a continent will be created. The members of the continent will be the "Base" territory, as well as any other territories in the "Neighbors" set that are within range.