Another 25 people were injured in what Ukrainian officials called a "terrorist attack" in the west of the country early on Sunday.