President Vladimir Putin says Russia could sign an agreement with legitimate Ukrainian representatives, perhaps "even with (President Volodymyr) Zelenskiy".