Brynmawr Medical Practice has had its contract handed back to the Aneurin Bevan University Health Board.