In 1945, the Polish Eastern Borderlands were annexed into Soviet Ukraine, and the family, like many other Poles, was resettled to Kraków, where Lem, at his father's insistence, took up medical studies at the Jagiellonian University.
Në 1945, Kresy polonisht lindore u aneksua në dhe të familjes, si shumë polet e tjera, u resettled në Krakov, ku lem në presionin e babait të tij mori studimet mjekësore në Universitetin Jagiellonian.