A Monte Carlo generator of the final state of hadrons emitted from an ultrarelativistic nuclear collision is introduced. An important feature of the generator is a possible fragmentation of the fireball and emission of the hadrons from fragments. Phase space distribution of the fragments is based on the blast wave model extended to azimuthally non-symmetric fireballs. Parameters of the model can be tuned and this allows to generate final states from various kinds of fireballs. A facultative output in the OSCAR1999A format allows for a comprehensive analysis of phase-space distributions and/or use as an input for an afterburner. Program summary Program title: DRAGON Catalogue identifier: AEDK_v1_0 Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEDK_v1_0.html Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland Licensing provisions: Standard CPC licence, http://cpc.cs.qub.ac.uk/licence/licence.html No. of lines in distributed program, including test data, etc.: 6383 No. of bytes in distributed program, including test data, etc.: 32 756 Distribution format: tar.gz Programming language: C++ Computer: PC Pentium 4, though no particular tuning for this machine was performed Operating system: Linux; the program has been successfully run on Gentoo Linux 2.6, RedHat Linux 9, Debian Linux 4.0, all with g++ compiler. It also ran successfully on MS Windows under Microsoft Visual C++ 2008 Express Edition as well as under cygwin/g++ RAM: 100 Mbytes Supplementary material: Sample output files from the test run, provided in the distribution, are available. Classification: 11.2 Nature of problem: Deconfined matter produced in ultrarelativistic nuclear collisions expands and cools down and eventually returns into the confined phase. If the expansion is fast, the fireball could fragment either due to spinodal decomposition or due to suddenly arising bulk viscous force. Particle abundances are reasonably well described with just a few parameters within the statistical approach. Momentum spectra integrated over many events can be interpreted as produced from an expanding and locally thermalised fireball. The present Monte Carlo model unifies these approaches: fireball decays into fragments of some characteristic size. The fragments recede from each other as given by the pre-existing expansion of the fireball. They subsequently emit stable and unstable hadrons with momenta generated according to thermal distribution. Resonances then decay and their daughters acquire momenta as dictated by decay kinematics. Solution method: The Monte Carlo generator repeats a loop in which it generates individual events. First, sizes of fragments are generated. Then the fragments are placed within the decaying fireball and their velocities are determined from the one-to-one correspondence between the position and the expansion velocity in the blast wave model. Since hadrons may be emitted from fragments as well as from the remaining bulk fireball, first those from the bulk are generated according to the blast wave model. Then, hadron production from the fragments is treated. Each hadron is generated in the rest frame of the fragment and then boosted to the global frame. Finally, after all directly produced hadrons are generated, resonance decay channels are chosen and the momenta and positions of final state hadrons are determined. Running time: Generation of 100 events can take anything between 2 hours to a couple of days. This depends mainly on the size and density of fragments. Simulations with small fragments may be very slow. At the beginning of a run there is a period of up to 1 hour in which the program calculates thermal weights due to statistical model. This period is long if many species are included in the simulation.