How do I pull categories from another category group for members of another category? `I will try this again.

I have an index page for each category within category group 1 (markets).   

I loop through the descendants of the given category to create filter buttons.

How do i pull all the categories from a 2nd category group (country) assigned to each market from markets  - listing them only once 

For the market from category group-1 (markets), I am using:

{% set segments = craft.categories.descendantOf(category) %}
{% for category in segments %}
button html using {{ category.title }}
``{% endfor %}

For the countries from category group-2 (country), I tried using:

{% set name = craft.categories.group('country').relatedTo(category) %}
{% for nation in name %} button html with {{ nation.countryName }}
{% endear %}

Where countryName is the field name for the country group.

I did not get a template error.  But nothing printed.
I forgot about the related entries.  So, I actually want to pull the related countries from the **entries** related to the market.

Here is the solution.  The key was the answer to this related question about related tags.

{% set entries = craft.entries.relatedTo(category).find() %}
{% set nation = craft.categories.group('country').relatedTo(entries).find()%}