Observations of transition region emission lines reveal the presence of redshifts in lines formed from the top of the chromosphere up to temperatures of about 2.5 × 105 K and blueshifts for temperatures above that. However, it is doubtful that the apparent large downward flows in the lower transition region represents an emptying of the corona, so some mechanism must be responsible for maintaining the mass balance between the corona and the lower atmospheric layers. We use a three-dimensional magnetohydrodynamics code to study the cycling of mass between the corona, transition region, and chromosphere by adding a tracer fluid to the simulation in various temperature intervals in the transition region. We find that most of the material seen in transition region emission lines formed at temperatures below 3 × 105 K is material that has been rapidly heated from chromospheric temperatures and thereafter is pushed down as it cools. This implies that the bulk of transition region material resides in small loops. In these loops, the density is high and radiative cooling is efficient.