Question: Before it was a commonwealth what was the country in which Madonna rubbed the country's flag between her thighs?

full_context: Document 1: Puerto Rico: Originally populated by the indigenous Taíno people, the island was claimed in 1493 by Christopher Columbus for Spain during his second voyage. Later it endured invasion attempts from the French, Dutch, and British. Four centuries of Spanish colonial government influenced the island's cultural landscapes with waves of African slaves, Canarian, and Andalusian settlers. In the Spanish Empire, Puerto Rico played a secondary, but strategic role when compared to wealthier colonies like Peru and the mainland parts of New Spain. Spain's distant administrative control continued up to the end of the 19th century, helping to produce a distinctive creole Hispanic culture and language that combined elements from the Native Americans, Africans, and Iberians. In 1898, following the Spanish -- American War, the United States acquired Puerto Rico under the terms of the Treaty of Paris.
Document 2: Madonna (entertainer): Academics noted that with her videos, Madonna was subtly reversing the usual role of male as the dominant sex. This symbolism and imagery was probably the most prevalent in the music video for "Like a Prayer". The video included scenes of an African-American church choir, Madonna being attracted to a statue of a black saint, and singing in front of burning crosses. This mix of the sacred and the profane upset the Vatican and resulted in the Pepsi commercial withdrawal. In 2003, MTV named her "The Greatest Music Video Star Ever" and said that "Madonna's innovation, creativity and contribution to the music video art form is what won her the award."
Document 3: Puerto Rico: Originally populated by the indigenous Taíno people, the island was claimed in 1493 by Christopher Columbus for the Crown of Castile during his second voyage. Later it endured invasion attempts from the French, Dutch, and British. Four centuries of Spanish colonial government transformed the island's ethnic, cultural and physical landscapes primarily with waves of African slaves, Canarian, and Andalusian settlers. In the Spanish imperial imagination, Puerto Rico played a secondary, but strategic role when compared to wealthier colonies like Peru and the mainland parts of New Spain. Spain's distant administrative control continued up to the end of the 19th century, helping to produce a distinctive creole Hispanic culture and language that combined elements from the Native Americans, Africans, and Iberians. In 1898, following the Spanish -- American War, the United States acquired Puerto Rico under the terms of the Treaty of Paris.
Document 4: History of Puerto Rico: Located in the northeastern Caribbean, Puerto Rico formed a key part of the Spanish Empire from the early years of the exploration, conquest and colonization of the New World. The island was a major military post during many wars between Spain and other European powers for control of the region in the 16th, 17th and 18th centuries. The smallest of the Greater Antilles, Puerto Rico was a stepping - stone in the passage from Europe to Cuba, Mexico, Central America, and the northern territories of South America. Throughout most of the 19th century until the conclusion of the Spanish -- American War, Puerto Rico and Cuba were the last two Spanish colonies in the New World; they served as Spain's final outposts in a strategy to regain control of the American continents. Realizing that it was in danger of losing its two remaining Caribbean territories, the Spanish Crown revived the Royal Decree of Graces of 1815. The decree was printed in Spanish, English and French in order to attract Europeans, with the hope that the independence movements would lose their popularity and strength with the arrival of new settlers. Free land was offered to those who wanted to populate the islands on the condition that they swear their loyalty to the Spanish Crown and allegiance to the Roman Catholic Church.
Document 5: Independence movement in Puerto Rico: After four hundred years of colonial rule by the Spanish Empire, Puerto Rico finally received its sovereignty in 1897 through a Carta de Autonomía (Charter of Autonomy). It was signed by Spanish Prime Minister Práxedes Mateo Sagasta and ratified by the Spanish Cortes.
Document 6: Puerto Rico: Originally populated by the indigenous Taíno people, the island was claimed in 1493 by Christopher Columbus for Spain during his second voyage. Later it endured invasion attempts from the French, Dutch, and British. Four centuries of Spanish colonial government influenced the island's cultural landscapes with waves of African slaves, Canarian, and Andalusian settlers. In the Spanish Empire, Puerto Rico played a secondary, but strategic role when compared to wealthier colonies like Peru and the mainland parts of New Spain. Spain's distant administrative control continued up to the end of the 19th century, helping to produce a distinctive creole Hispanic culture and language that combined elements from the Native Americans, Africans, and Iberians. In 1898, following the Spanish -- American War, the United States acquired Puerto Rico under the terms of the Treaty of Paris. The treaty took effect on April 11, 1899.
Document 7: Puerto Rico: Originally populated by the indigenous Taíno people, the island was claimed in 1493 by Christopher Columbus for the Crown of Castile during his second voyage. Later it endured invasion attempts from the French, Dutch, and British. Four centuries of Spanish colonial government transformed the island's ethnic, cultural and physical landscapes primarily with waves of African slaves, and Canarian, and Andalusian settlers. In the Spanish imperial imagination, Puerto Rico played a secondary, but strategic role when compared to wealthier colonies like Peru and the mainland parts of New Spain. Spain's distant administrative control continued up to the end of the 19th century, helping to produce a distinctive creole Hispanic culture and language that combined elements from the Native Americans, Africans, and Iberians. In 1898, following the Spanish -- American War, the United States acquired Puerto Rico along with other Spanish colonies under the terms of the Treaty of Paris.
Document 8: History of Puerto Rico: On August 10, 1815, the Royal Decree of Grace was issued, allowing foreigners to enter Puerto Rico (including French refugees from Hispaniola), and opening the port to trade with nations other than Spain. This was the beginning of agriculture-based economic growth, with sugar, tobacco, and coffee being the main products. The Decree also gave free land to anyone who swore their loyalty to the Spanish Crown and their allegiance to the Roman Catholic Church. Thousands of families from all regions of Spain (particularly Asturias, Catalonia, Majorca and Galicia), Germany, Corsica, Ireland, France, Portugal, the Canary Islands and other locations, escaping from harsh economic times in Europe and lured by the offer of free land, soon immigrated to Puerto Rico. However, these small gains in autonomy and rights were short lived. After the fall of Napoleon, absolute power returned to Spain, which revoked the Cádiz Constitution and reinstated Puerto Rico to its former condition as a colony, subject to the unrestricted power of the Spanish monarch.
Document 9: La Isla Bonita: In the accompanying music video, Madonna portrayed two opposite characters – a young, pious Catholic woman and a glamorous, passionate Latina.  The Latin style and the flamenco red dress she wore became a trend later.  The song is one of the most performed live songs by Madonna, appearing in six of her world tours, the most recent being on the Rebel Heart Tour (2015–16). Madonna  has regularly performed the song in its Spanish form, sometimes with tribal or folk songs and remixes to accompany it. The song has been covered by various artists across the world, including Byanka (Mexico), Elvy Sukaesih (Indonesia) and Alizée (France).
Document 10: Madonna (entertainer): In September 1993, Madonna embarked on The Girlie Show World Tour, in which she dressed as a whip-cracking dominatrix surrounded by topless dancers. In Puerto Rico she rubbed the island's flag between her legs on stage, resulting in outrage among the audience. In March 1994, she appeared as a guest on the Late Show with David Letterman, using profanity that required censorship on television, and handing Letterman a pair of her panties and asking him to smell it. The releases of her sexually explicit films, albums and book, and the aggressive appearance on Letterman all made critics question Madonna as a sexual renegade. Critics and fans reacted negatively, who commented that "she had gone too far" and that her career was over.
Document 11: Madonna (entertainer): Following Die Another Day, Madonna collaborated with fashion photographer Steven Klein in 2003 for an exhibition installation named X-STaTIC Pro=CeSS. It included photography from a photo shoot in W magazine, and seven video segments. The installation ran from March to May in New York's Deitch Projects gallery. It traveled the world in an edited form. The same year, Madonna released her ninth studio album, American Life, which was based on her observations of American society; it received mixed reviews. She commented, "[American Life] was like a trip down memory lane, looking back at everything I've accomplished and all the things I once valued and all the things that were important to me." Larry Flick from The Advocate felt that "American Life is an album that is among her most adventurous and lyrically intelligent" while condemning it as "a lazy, half-arsed effort to sound and take her seriously." The title song peaked at number 37 on the Hot 100. Its original music video was canceled as Madonna thought that the video, featuring violence and war imagery, would be deemed unpatriotic since America was then at war with Iraq. With four million copies sold worldwide, American Life was the lowest-selling album of her career at that point.
Document 12: Madonna (entertainer): Madonna's use of sexual imagery has benefited her career and catalyzed public discourse on sexuality and feminism. As Roger Chapman documents in Culture Wars: An Encyclopedia of Issues, Viewpoints, and Voices, Volume 1 (2010), she has drawn frequent condemnation from religious organizations, social conservatives and parental watchdog groups for her use of explicit, sexual imagery and lyrics, religious symbolism, and otherwise "irreverent" behavior in her live performances. The Times wrote that she had "started a revolution amongst women in music ... Her attitudes and opinions on sex, nudity, style and sexuality forced the public to sit up and take notice." Professor John Fiske noted that the sense of empowerment that Madonna offers is inextricably connected with the pleasure of exerting some control over the meanings of self, of sexuality, and of one's social relations. In Doing Gender in Media, Art and Culture (2009), the authors noted that Madonna, as a female celebrity, performer, and pop icon, is able to unsettle standing feminist reflections and debates. According to lesbian feminist Sheila Jeffreys, Madonna represents woman's occupancy of what Monique Wittig calls the category of sex, as powerful, and appears to gleefully embrace the performance of the sexual corvée allotted to women. Professor Sut Jhally has referred to Madonna as "an almost sacred feminist icon."
Document 13: Spanish West Indies: The islands that later became the Spanish West Indies were the focus of the voyages of the Spanish expedition of Christopher Columbus in America. Largely due to the familiarity that Spaniards gained from Columbus's voyages, the islands were also the first lands to be permanently colonized by Spanish in the Americas. The Spanish West Indies were also the most enduring part of Spain's American Empire, only being surrendered in 1898 at the end of the Spanish–American War. For over three centuries, Spain controlled a network of ports in the Caribbean including Havana (Cuba), San Juan (Puerto Rico), Cartagena de Indias (Colombia), Veracruz (Mexico), and Portobelo, Panama, which were connected by galleon routes.
Document 14: Madonna (entertainer): Madonna entered mainstream films in February 1985, beginning with a brief appearance as a club singer in Vision Quest, a romantic drama film. Its soundtrack contained two new singles, her U.S. number-one single, "Crazy for You", and another track "Gambler". She also played the title role in the 1985 comedy Desperately Seeking Susan, a film which introduced the song "Into the Groove", her first number-one single in the UK. Her popularity relegated the film as a Madonna vehicle, despite not having lead actress billing. The New York Times film critic Vincent Canby named it one of the ten best films of 1985.Beginning in April 1985, Madonna embarked on her first concert tour in North America, The Virgin Tour, with the Beastie Boys as her opening act. She progressed from playing CBGB and the Mudd Club to playing large sporting arenas. The tour saw the peak of Madonna wannabe phenomenon, with lots of female attendees dressing like her. At that time, she released two more hits, "Angel" and "Dress You Up", making all four singles from the album peak inside the top five on the Hot 100 chart. In July, Penthouse and Playboy magazines published a number of nude photos of Madonna, taken in New York in 1978. She had posed for the photographs as she needed money at the time, and was paid as little as $25 a session. The publication of the photos caused a media uproar, but Madonna remained "unapologetic and defiant". The photographs were ultimately sold for up to $100,000. She referred to these events at the 1985 outdoor Live Aid charity concert, saying that she would not take her jacket off because "[the media] might hold it against me ten years from now."
Document 15: Madonna (entertainer): Madonna embarked on the Confessions Tour in May 2006, which had a global audience of 1.2 million and grossed over $193.7 million, becoming the highest-grossing tour to that date for a female artist. Madonna used religious symbols, such as the crucifix and Crown of Thorns, in the performance of "Live to Tell". It caused the Russian Orthodox Church and the Federation of Jewish Communities of Russia to urge all their members to boycott her concert. At the same time, the International Federation of the Phonographic Industry (IFPI) announced officially that Madonna had sold over 200 million copies for her albums alone worldwide.
ground_truth: a key part of the Spanish Empire
sub_queries: In which country did Madonna rubbed the country's flag between her thighs that anger the public? Answer: Puerto Rico
what was Puerto Rico before it was a commonwealth Answer: a key part of the Spanish Empire