Answer: setting up puppet governments there.
Step-by-step explanation:
The Soviet Union was able to maintain control over every country in its Warsaw Pact by setting up communist governments that were essentially puppets to their masters in Moscow.
Poland and Hungary were in the Warsaw Pact and so were ruled by puppet communist governments. These governments were only allowed to pursue policies that the Soviets wanted and if they refused or deviated, they would be invaded by Soviet troops.