Billings man gets 40 years in prison for beating 4 women