Complex sentence: Ribbentrop Pact and contrary to the Soviet-Polish non-aggression treaty and captured Tarnopol, which was renamed Ternopol and incorporated into their Ukrainian Soviet Socialist Republic.
Split into simpler sentences: Ribbentrop Pact and contrary to the Soviet-Polish non-aggression treaty. Tarnopol was captured, renamed Ternopol, and incorporated into the Ukrainian Soviet Socialist Republic.