You will be given a definition of a task first, then some input of the task.
In this task, you're given passages that contain mentions of names of people, places, or things. Some of these mentions refer to the same person, place, or thing. Your job is to write questions that evaluate one's understanding of such references. Good questions are expected to link pronouns (she, her, him, his, their, etc.) or other mentions to people, places, or things to which they may refer. Do not ask questions that can be answered correctly without understanding the paragraph or having multiple answers. Avoid questions that do not link phrases referring to the same entity. For each of your questions, the answer should be one or more phrases in the paragraph, and it should be unambiguous.

Passage: Pre-election public-opinion polls had promised victory to the communists. Thus the total defeat of the PZPR and its satellite parties came as a surprise to all involved: after the first round of elections, it became evident that Solidarity had fared extremely well, capturing 160 of 161 contested Sejm seats, and 92 of 100 Senate seats. After the second round, it had won virtually every seat—all 161 in the Sejm, and 99 in the Senate.These elections, in which anti-communist candidates won a striking victory, inaugurated a series of peaceful anti-communist revolutions in Central and Eastern Europe that eventually culminated in the fall of communism.The new Contract Sejm, named for the agreement that had been reached by the communist party and the Solidarity movement during the Polish Round Table Talks, would be dominated by Solidarity. As agreed beforehand, Wojciech Jaruzelski was elected president. However, the communist candidate for Prime Minister, Czesław Kiszczak, who replaced Mieczysław Rakowski, failed to gain enough support to form a government.On June 23, a Solidarity Citizens' Parliamentary Club (Obywatelski Klub Parliamentarny "Solidarność") was formed, led by Bronisław Geremek. It formed a coalition with two ex-satellite parties of the PZPR — United People's Party and Democratic Party — which had now chosen to "rebel" against the PZPR, which found itself in the minority. On August 24, the Sejm elected Tadeusz Mazowiecki, a Solidarity representative, to be Prime Minister of Poland. Not only was he a first non-communist Polish Prime Minister since 1945, he became the first non-Communist prime minister in Eastern Europe for nearly 40 years. In his speech he talked about the "thick line" (Gruba kreska) which would separate his government from the communist past By the end of August 1989, a Solidarity-led coalition government had been formed.
Output:
What is the last name of the person who became the first non-Communist prime minister in Eastern Europe for nearly 40 years?