solve pigeon_list exercise