Republican presidential candidate Donald Trump said on Friday he would work with both Ukraine and Russia to end their war, as he stood next to Ukrainian leader Volodymyr Zelenskiy before their meeting in New York.

Speaking to reporters at Trump Tower, Zelenskiy said he wants to discuss with Trump his “victory plan” for Ukraine. Trump praised Zelenskiy, but said he also had a solid relationship with Russian President Vladimir Putin.

“We have a very good relationship (with Zelenskiy), and I also have a very good relationship, as you know, with President Putin,” Trump said. “And I think if we win, I think we’re going to get it resolved very quickly,” he added, referring to the Nov. 5 U.S presidential election.

Trump’s meeting with Zelenskiy comes after he criticized the Ukrainian leader on the campaign trail and expressed doubts the U.S. ally can win its war with Russia.

Zelenskiy, who is in the United States for the U.N. General Assembly, met on Thursday with Democratic President JoeBiden and Vice President Kamala Harris, the Democratic presidential candidate in the Nov. 5 election.