Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
Indirect presidential elections were held in Poland on 19 July 1989. The elections were the first after the office of President of the Republic of Poland had been re-established after a period of Communist rule and were the last in which the President was elected by Parliament (joint houses of the Sejm and Senate). Despite adoption of the democratic system there was only one candidate.
After the Round Table Agreement, which resulted in a semi-free parliamentary election, marked by effective Solidarity victory and de facto loss of the Polish United Workers' Party, on July 4, 1989, Adam Michnik proposed a power-sharing deal between communist and the democratic opposition (Your President, our Prime Minister), according to which Chairman of the Council of State and Communist leader Wojciech Jaruzelski would become president and a solidarity representative Prime Minister (this position indeed went to Tadeusz Mazowiecki in August, albeit after an attempt by Jaruzelski to impose fellow PZPR member Czesław Kiszczak as Prime Minister). After much debate within both camps this conception won.
Jaruzelski ran unopposed, but won by just a one-vote majority needed, as many Solidarity MPs, while supporting the agreement, felt just unable to cast their votes or, to not disturb the process, cast abstain or invalid votes.
Electoral system
The President was elected by the National Assembly, a joint sitting of the Sejm and the Senate, by open ballot. The members of the Assembly were elected in the 1989 Polish parliamentary election; although 460 deputies and 100 senators (making 560 electors) had been elected, senator Grzegorz Białkowski [pl; de] died before the presidential election and his replacement was yet to be chosen.
The composition of the National Assembly was as follows: