print line before column 1 transitions

I have a space delimited text file with thousands of lines, COLA.TXT that looks for example like this:
AA 123 456 789
AA 987 987 987
AA 987 988 888
AA 999 999 999
B 123 456 789
B 111 111 111
CCD 123 456 789
CCD 321 654 987
CCD
EE 11 11
EE
EE
EE 00 00 00
EE

Anyway, I need a script that will print the first and last line of each transition of the first column. In other words it will print the first and last lines of each "section". Sample output might look something like this:
AA 123 456 789
AA 999 999 999
B 123 456 789
B 111 111 111
CCD 123 456 789
CCD
EE 11 11
EE

Note when there are only two lines in a section (B) it still prints the first and second lines. there are always at least 2 lines. sometimes there are 10+ lines though. I see this as being pretty complicated? I dont know though, everybody on here is amazing!!! Thank you so much in advance!

awk 'END{print _}!y[$1]++&&NR>1{print _}{_=$0}!x[$1]++' file

Use nawk or /usr/xpg4/bin/awk on Solaris.

thank you! wow that is awesome. Ok so will it ever be possible that I could write a script command like that? I always have to ask. ANd I'm always glad I did cuzz I couldnt ever of figured it out. thx again.