Question: When did the Japanese invasion of the country that enjoys Gukhwappang end?

full_context: Document 1: Gukhwa-ppang: Gukhwa-ppang (; "chrysanthemum bread") is a flower-shaped pastry stuffed with sweetened red bean paste. It is a warm street food sold throughout Korea. It is grilled in an appliance similar to a waffle iron, but with flower-shaped molds.
Document 2: Mutschel: The Mutschel is a traditional star-shaped bread from Reutlingen, Germany. The pastry, and the corresponding Mutscheltag (Mutschel Day), have probably existed since the 13th century. Mutscheln are roughly circular and come in various sizes: usually approximately six inches in diameter, but bakeries often offer breads three or more feet in diameter. They are sometimes made in sweet varieties.
Document 3: Samurai: Katō Kiyomasa was one of the most powerful and well-known lords of the Sengoku Era. He commanded most of Japan's major clans during the invasion of Korea (1592–1598). In a handbook he addressed to "all samurai, regardless of rank" he told his followers that a warrior's only duty in life was to "...grasp the long and the short swords and to die". He also ordered his followers to put forth great effort in studying the military classics, especially those related to loyalty and filial piety. He is best known for his quote: "If a man does not investigate into the matter of Bushido daily, it will be difficult for him to die a brave and manly death. Thus it is essential to engrave this business of the warrior into one's mind well."
Document 4: Kleicha: Kleicha () may be considered the national cookie of both Iraq and Saudi Arabia. Kleicha come in several traditional shapes and fillings. The most popular are the ones filled with dates ("kleichat tamur"). There are also sweet discs ("khfefiyyat"), as well as half moons filled with nuts, sugar and/or desiccated coconut ("kleichat joz").
Document 5: Tiger bread: The bread is generally made with sesame oil, which gives it a distinct aroma, and with a pattern baked into the top made by painting rice paste onto the surface prior to baking. The paste dries and cracks during the baking process. The rice paste crust also gives the bread a distinctive flavour. It has a crusty exterior, but is soft inside. Typically, tiger bread is made as a white bread bloomer loaf or bread roll, but the technique can be applied to any shape of bread.
Document 6: Samurai: In the 13th century, Hōjō Shigetoki (1198–1261 AD) wrote: "When one is serving officially or in the master's court, he should not think of a hundred or a thousand people, but should consider only the importance of the master." Carl Steenstrup noted that 13th and 14th century warrior writings (gunki) "portrayed the bushi in their natural element, war, eulogizing such virtues as reckless bravery, fierce family pride, and selfless, at times senseless devotion of master and man". Feudal lords such as Shiba Yoshimasa (1350–1410 AD) stated that a warrior looked forward to a glorious death in the service of a military leader or the Emperor: "It is a matter of regret to let the moment when one should die pass by....First, a man whose profession is the use of arms should think and then act upon not only his own fame, but also that of his descendants. He should not scandalize his name forever by holding his one and only life too dear....One's main purpose in throwing away his life is to do so either for the sake of the Emperor or in some great undertaking of a military general. It is that exactly that will be the great fame of one's descendants."
Document 7: Hwangnam-ppang: Hwangnam bread (named after its region of origin, Hwangnam-dong), also commonly called Gyeongju bread, is a local specialty of Gyeongju City, South Korea. It is a small pastry with a filling of red bean paste. Gyeongju bread was first baked in 1939 at a bakery in Hwangnam-dong in central Gyeongju.
Document 8: Samurai: Bushi was the name given to the ancient Japanese soldiers from traditional warrior families. The bushi class was developed mainly in the north of Japan. They formed powerful clans, which in the 12th century were against the noble families who were grouping themselves to support the imperial family who lived in Kyoto. Samurai was a word used by the Kuge aristocratic class with warriors themselves preferring the word bushi. The term Bushidō, the "way of the warrior", is derived from this term and the mansion of a warrior was called bukeyashiki.
Document 9: Samurai: It should be noted that many samurai forces that were active throughout this period were not deployed to Korea; most importantly, the daimyo Tokugawa Ieyasu carefully kept forces under his command out of the Korean campaigns, and other samurai commanders who were opposed to Hideyoshi's domination of Japan either mulled Hideyoshi's call to invade Korea or contributed a small token force. Most commanders who did opposed or otherwise resisted/resented Hideyoshi ended up as part of the so-called Eastern Army, while commanders loyal to Hideyoshi and his son (a notable exception to this trend was Katō Kiyomasa, who deployed with Tokugawa and the Eastern Army) were largely committed to the Western Army; the two opposing sides (so named for the relative geographical locations of their respective commanders' domains) would later clash, most notably at the Battle of Sekigahara, which was won by Tokugawa Ieyasu and the Eastern Forces, paving the way for the establishment of the Tokugawa Shogunate.
Document 10: Somalis: Xalwo (halva) is a popular confection eaten during festive occasions, such as Eid celebrations or wedding receptions. It is made from sugar, corn starch, cardamom powder, nutmeg powder and ghee. Peanuts are also sometimes added to enhance texture and flavor. After meals, homes are traditionally perfumed using frankincense (lubaan) or incense (cuunsi), which is prepared inside an incense burner referred to as a dabqaad.
Document 11: Samurai: Historian H. Paul Varley notes the description of Japan given by Jesuit leader St. Francis Xavier (1506–1552): "There is no nation in the world which fears death less." Xavier further describes the honour and manners of the people: "I fancy that there are no people in the world more punctilious about their honour than the Japanese, for they will not put up with a single insult or even a word spoken in anger." Xavier spent the years 1549–1551 converting Japanese to Christianity. He also observed: "The Japanese are much braver and more warlike than the people of China, Korea, Ternate and all of the other nations around the Philippines."
Document 12: Habichuelas con dulce: Habichuelas con dulce is a sweet bean liquid dessert from the Dominican Republic that is especially popular around the Easter holiday. The dessert is part of the cuisine of the Dominican Republic and is traditionally garnished with milk cookies or with casabe, "a flatbread made of yuca flour."
Document 13: Samurai: Torii Mototada (1539–1600) was a feudal lord in the service of Tokugawa Ieyasu. On the eve of the battle of Sekigahara, he volunteered to remain behind in the doomed Fushimi Castle while his lord advanced to the east. Torii and Tokugawa both agreed that the castle was indefensible. In an act of loyalty to his lord, Torii chose to remain behind, pledging that he and his men would fight to the finish. As was custom, Torii vowed that he would not be taken alive. In a dramatic last stand, the garrison of 2,000 men held out against overwhelming odds for ten days against the massive army of Ishida Mitsunari's 40,000 warriors. In a moving last statement to his son Tadamasa, he wrote:
Document 14: Samurai: Despite the rampant romanticism of the 20th century, samurai could be disloyal and treacherous (e.g., Akechi Mitsuhide), cowardly, brave, or overly loyal (e.g., Kusunoki Masashige). Samurai were usually loyal to their immediate superiors, who in turn allied themselves with higher lords. These loyalties to the higher lords often shifted; for example, the high lords allied under Toyotomi Hideyoshi (豊臣秀吉) were served by loyal samurai, but the feudal lords under them could shift their support to Tokugawa, taking their samurai with them. There were, however, also notable instances where samurai would be disloyal to their lord or daimyo, when loyalty to the Emperor was seen to have supremacy.
Document 15: Samurai: The philosophies of Buddhism and Zen, and to a lesser extent Confucianism and Shinto, influenced the samurai culture. Zen meditation became an important teaching due to it offering a process to calm one's mind. The Buddhist concept of reincarnation and rebirth led samurai to abandon torture and needless killing, while some samurai even gave up violence altogether and became Buddhist monks after realizing how fruitless their killings were. Some were killed as they came to terms with these realizations in the battlefield. The most defining role that Confucianism played in samurai philosophy was to stress the importance of the lord-retainer relationship—the loyalty that a samurai was required to show his lord.
ground_truth: 1598
sub_queries: Which was the country for Gukhwappang? Answer: Korea
When did Japan finish invading Korea ? Answer: 1598