Ukraine's president said his country was open to "engagement" about "difficult and painful chapters of our shared past".