Problem: Nominally, sovereignty lay in the emperor but in fact power was wielded by the Fujiwara nobility. However, to protect their interests in the provinces, the Fujiwara and other noble families required guards, police and soldiers. The warrior class made steady political gains throughout the Heian period. As early as 939 A.D, Taira no Masakado threatened the authority of the central government, leading an uprising in the eastern province of Hitachi, and almost simultaneously, Fujiwara no Sumitomo rebelled in the west. Still, a true military takeover of the Japanese government was centuries away, when much of the strength of the government would lie within the private armies of the shogunate.
Who threatened the authority of Japan's central government?
The answer is the following: Taira no Masakado


The term Carnival is traditionally used in areas with a large Catholic presence. However, the Philippines, a predominantly Roman Catholic country, does not celebrate Carnival anymore since the dissolution of the Manila Carnival after 1939, the last carnival in the country. In historically Lutheran countries, the celebration is known as Fastelavn, and in areas with a high concentration of Anglicans and Methodists, pre-Lenten celebrations, along with penitential observances, occur on Shrove Tuesday. In Eastern Orthodox nations, Maslenitsa is celebrated during the last week before Great Lent. In German-speaking Europe and the Netherlands, the Carnival season traditionally opens on 11/11 (often at 11:11 a.m.). This dates back to celebrations before the Advent season or with harvest celebrations of St. Martin's Day.
The Philippines stopped celebrating Carnival after what year? 
1939


Input: Pesticide
The first legislation providing federal authority for regulating pesticides was enacted in 1910; however, decades later during the 1940s manufacturers began to produce large amounts of synthetic pesticides and their use became widespread. Some sources consider the 1940s and 1950s to have been the start of the "pesticide era." Although the U.S. Environmental Protection Agency was established in 1970 and amendments to the pesticide law in 1972, pesticide use has increased 50-fold since 1950 and 2.3 million tonnes (2.5 million short tons) of industrial pesticides are now[when?] used each year. Seventy-five percent of all pesticides in the world are used in developed countries, but use in developing countries is increasing. A study of USA pesticide use trends through 1997 was published in 2003 by the National Science Foundation's Center for Integrated Pest Management.

When did America establish the Environmental Protection Agency?
Output: 1970


Input: Article: Sentient beings always suffer throughout saṃsāra until they free themselves from this suffering (dukkha) by attaining Nirvana. Then the absence of the first Nidāna—ignorance—leads to the absence of the others.

Now answer this question: What is suffering also called?

Output: dukkha


Article: On 3 December, Chopin complained about his bad health and the incompetence of the doctors in Majorca: "Three doctors have visited me ... The first said I was dead; the second said I was dying; and the third said I was about to die." He also had problems having his Pleyel piano sent to him. It finally arrived from Paris in December. Chopin wrote to Pleyel in January 1839: "I am sending you my Preludes [(Op. 28)]. I finished them on your little piano, which arrived in the best possible condition in spite of the sea, the bad weather and the Palma customs." Chopin was also able to undertake work on his Ballade No. 2, Op. 38; two Polonaises, Op. 40; and the Scherzo No. 3, Op. 39.

Question: How many doctors saw Frédéric by the 3rd of December?
Ans: Three


Input: Muammar Gaddafi
From childhood, Gaddafi was aware of the involvement of European colonialists in Libya; his nation was occupied by Italy, and during the North African Campaign of World War II it witnessed conflict between Italian and British troops. According to later claims, Gaddafi's paternal grandfather, Abdessalam Bouminyar, was killed by the Italian Army during the Italian invasion of 1911. At World War II's end in 1945, Libya was occupied by British and French forces. Although Britain and France intended on dividing the nation between their empires, the General Assembly of the United Nations (UN) declared that the country be granted political independence. In 1951, the UN created the United Kingdom of Libya, a federal state under the leadership of a pro-western monarch, Idris, who banned political parties and established an absolute monarchy.

When Libya first became an independent country, what form of government did it adopt?
Output:
an absolute monarchy