German Chancellor Merkel visits Ukraine before leaving office