  Transformation of amorphous carbon clusters into fullerenes under high
temperature is studied using molecular dynamics simulations at microsecond
times. Based on the analysis of both structure and energy of the system, it is
found that fullerene formation occurs in two stages. Firstly, fast
transformation of the initial amorphous structure into a hollow sp$^2$ shell
with a few chains attached occurs with a considerable decrease of the potential
energy and the number of atoms belonging to chains and to the amorphous domain.
Then, insertion of remaining carbon chains into the sp$^2$ network takes place
at the same time with the fullerene shell formation. Two types of defects
remaining after the formation of the fullerene shell are revealed: 7-membered
rings and single one-coordinated atoms. One of the fullerene structures
obtained contains no defects at all, which demonstrates that defect-free carbon
cages can be occasionally formed from amorphous precursors directly without
defect healing. No structural changes are observed after the fullerene
formation, suggesting that defect healing is a slow process in comparison with
the fullerene shell formation. The schemes of the revealed reactions of chain
atoms insertion into the fullerene shell just before its completion are
presented. The results of the performed simulations are summarized within the
paradigm of fullerene formation due to selforganization of the carbon system.
