  We present multi-wavelength observations of the brightest galaxies in four
X-ray luminous groups at z~0.37 that will merge to form a cluster comparable in
mass to Coma. Ordered by increasing stellar mass, the four brightest group
galaxies (BGGs) present a time sequence where BGG-1, 2, and 3 are in merging
systems and BGG-4 is a massive remnant [M(stars)=6.7x10^(11) Msun]. BGG-1 and 2
have bright, gravitationally bound companions and BGG-3 has two nuclei
separated by only 2.5 kpc, thus merging at z<0.5 increases the BGG mass by >40%
(merging timescale<2 Gyr) and V-band luminosity by ~0.4 mag. The BGGs'
rest-frame (B-V) colors correspond to stellar ages of >3 Gyr, and their tight
scatter in (B-V) color [sigma(BV)=0.032] confirms they formed the bulk of their
stars at z>0.9. Optical spectroscopy shows no signs of recent (<1.5 Gyr) or
ongoing star formation. Only two BGGs are weakly detected at 24 microns, and
X-ray and optical data indicate the emission in BGG-2 is due to an AGN. All
four BGGs and their companions are early-type (bulge-dominated) galaxies, and
they are embedded in diffuse stellar envelopes up to ~140 kpc across. The four
BGG systems must evolve into the massive, red, early-type galaxies dominating
local clusters. Our results show that: 1) massive galaxies in groups and
clusters form via dissipationless merging; and 2) the group environment is
critical for this process.
