Cities try to protect police and fire from budget cuts