I know that house prices vary enormously across the country but I've just been looking on the RightMove website for 3-bedroom properties in some random locations around South Wales. I'm coming up with prices like £185,000 for a semi-detached property near to Merthyr Tydfil (but as low as £50,000 for some terraced properties in that area) or £410,000 for a terraced house in Cardiff's Pontcanna district (with terraced properties elsewhere in the city starting from around £70,000). Even looking for the lowest prices for a terraced property in Cwmbran, I'm still getting figures in the region of £90,000.
I recommend seeing what properties are being offered for in the area where your father lived:
http://www.rightmove.co.uk/
(By default, the most expensive properties are listed first. Click on 'Sort by Lowest Price', in the top right-hand corner, to reverse the order).
If the property needs a lot of work, knock 15% (or, at the most, 20%) off the usual market price. However I suspect that you'll still find that, by selling at £40,000, you'll be losing at least £10,000 pounds (and possibly far more).
Chris