Conversion of polycyclic aromatic hydrocarbons to graphite and diamond at high pressures