Releasing prisoners at the end of wars