Input (grade 12): Same-sex marriage is legal in Argentina, Belgium, Canada, Iceland, the Netherlands, Norway, Portugal, South Africa, Spain and Sweden.
Output (grade 11): The countries that have them are the Netherlands, South Africa, Canada, Argentina, Iceland, Sweden, Spain, Norway, Portugal and Belgium.