SED: joining specific lines

I have a .txt file containing lines like:

ZAN ZAN name = AI_EVENT desc (further text)
ZAN ZAN name = AI_EVENT desc ... 
ZAN ZAN1 name = AI_EVENT desc ...
ZAN ZAN1 name = AI_EVENT desc ...
WUR WUR name = AI_EVENT desc ...
WUR WUR name = AI_EVENT desc ...
VEN VEN name = AI_EVENT desc ...
VEN VEN name = AI_EVENT desc ...
VEN VEN1 name = AI_EVENT desc ...
VEN VEN1 name = AI_EVENT desc ...
VEN VEN2 name = AI_EVENT desc ...
VEN VEN2 name = AI_EVENT desc ...
etc (more lines sorted in a reverse alphabetical order)

I am seeking to join the lines which start with the same three letter combination, how would I go about doing this? I only have limited experience with SED and I cannot figure out a way to get this done.

if you have Python

d={}
for lines in open("file"):    
    d.setdefault( lines[:3],"" )    
    d[ lines[:3] ] = d[ lines[:3] ] +" "+ lines[3:].strip()
    
for i,j in d.iteritems():
    print i,j

As I understand your question, using Perl (and your sample data file) this code should do what you need:

#!/usr/bin/perl
my @array1;
my $key1;
open INPUT, "<datfile";
open OUTPUT, ">outfile";
while(<INPUT>)
{
chomp;
my @fields = split;
$key1 = $fields[0];
shift @fields;
my $x = join " ", @fields;
$array1{$key1} .= $x;
}
while ( ($key, $value) = each %array1)
{
print OUTPUT "$key $value\n";
}
close INPUT;
close OUTPUT;