Shell scripting

Sir, I am new to shell scripting. I request you to help me for this.
I have the data file in the given format. In the given file, 3 structures are there starting with�Contig�and each structure having substructures starting with�-� like -150.90, -150.70, -149.70. One substructure contains range of values and one did not have any value. In -150.70, three ranges are there in that 672:693 and 679:700 are continous. I need a shell program to combine such ranges like 672:700 for this and remove the substructures which do not have range of values. The output needed shown below.

INPUT                   

Contig1430
-150.90:
-150.70:
672:693
711:732
679:700
-149.70:

Contig1439
-134.80
20:41
42:63
55:76

Contig1454
-178.40:
536:557
648:669
546:567
551:572
554:575
561:582
567:588
572:593
579:600
583:604
591:612
601:622
607:628
614:635
617:638

OUTPUT

Contig1430
-150.70:
672:700
711:732

Contig1439
-134.80
20:76

Contig1454
-178.40:
536:638

What have you tried so far, where are you stuck? Did you even try anything so far, or are you just hoping for us to do your work?