Mechanism of carbon onion transformation into diamond-like structure