The bankruptcy problem: a cooperative bargaining approach