Ramaphosa accepts resignation