A group of teenagers have climbed out of an illegal gold mine in South Africa.