#!/usr/bin/perl

use strict;
use warnings;

use FindBin qw/$Bin/;
use lib "$Bin";

use RegionsData;

my @leaf_islands;
for my $id (keys %RegionData::REGIONS){
    my $reg = $RegionData::REGIONS{$id};
    if( $reg->{type} == 5 && @{$reg->{childs}} == 0 ){
        push @leaf_islands, $reg->{name};
    }
}

print join ",", @leaf_islands; 

