Who invented capital punishment?

Capital punishment dates back to ancient times