In 2003, Putin started working hard on Ukraine, launching the Common Economic Space of Russia, Ukraine, Belarus and Kazakhstan. Shrewdly, then-President Leonid Kuchma went along, and in 2004 Putin saw Kuchma literally every month. During the 2004 presidential campaign, Putin went to Ukraine twice to campaign for his preferred candidate, Viktor Yanukovych. Despite gross election fraud, Putin congratulated him three times on his victory. Even so, he did not think much of Yanukovych.
Read more here.