#! /usr/bin/perl -w
use strict;

# The translation table
my %codon;
$codon{'A'} = ['GCA', 'GCC', 'GCG', 'GCT'];
$codon{'C'} = ['TGC', 'TGT'];
$codon{'D'} = ['GAC', 'GAT'];
$codon{'E'} = ['GAA', 'GAG'];
$codon{'F'} = ['TTC', 'TTT'];
$codon{'G'} = ['GGA', 'GGC', 'GGG', 'GGT'];
$codon{'H'} = ['CAC', 'CAT'];
$codon{'I'} = ['ATA', 'ATC', 'ATT'];
$codon{'K'} = ['AAA', 'AAG'];
$codon{'L'} = ['CTA', 'CTC', 'CTG', 'CTT', 'TTA', 'TTG'];
$codon{'M'} = ['ATG'];
$codon{'N'} = ['AAC', 'AAT'];
$codon{'P'} = ['CCA', 'CCC', 'CCG', 'CCT'];
$codon{'Q'} = ['CAA', 'CAG'];
$codon{'R'} = ['AGA', 'AGG', 'CGA', 'CGC', 'CGG', 'CGT'];
$codon{'S'} = ['AGC', 'AGT', 'TCA', 'TCC', 'TCG', 'TCT'];
$codon{'T'} = ['ACA', 'ACC', 'ACG', 'ACT'];
$codon{'V'} = ['GTA', 'GTC', 'GTG', 'GTT'];
$codon{'W'} = ['TGG'];
$codon{'Y'} = ['TAC', 'TAT'];

# Print the translation table
foreach my $aa ( sort keys %codon ) {
   print "$aa: ";
   foreach my $nuc ( @{$codon{$aa}} ) {
      print "$nuc ";
   }
   print "\n";
}
