I was playing EU4 as venice and somehow the palailogos dynasty ended in control of Russia. They later inherited byzantium and put another palailogos on the spanish throne.