Clamp the brake flexi-hoses off (with molegrips or similar) one by one, press the brake pedal to determine which brake is at fault. When your brake pedal feels good you have found the problem corner.
If you clamp all 4 off and the pedal is still poor, master cylinder could be the problem.