class Main { privatestaticString traduction(int N, int M, String[] traduction, String s) { String chaine = ""; for(int i = 0; i < N ; i += 3) { int a = 0; int b = 0; for(int j = 0; j <3; j++) { if(s.charAt(i+j) == 'C')
a = 1; elseif(s.charAt(i+j) == 'T')
a = 2; elseif(s.charAt(i+j) == 'G')
a = 3; else
a = 0;
if(table_traduction[i][0].charAt(0) == 'C')
a = 1; elseif(table_traduction[i][0].charAt(0) == 'T')
a = 2; elseif(table_traduction[i][0].charAt(0) == 'G')
a = 3; else
a = 0;
if(table_traduction[i][0].charAt(1) == 'C')
b = 1; elseif(table_traduction[i][0].charAt(1) == 'T')
b = 2; elseif(table_traduction[i][0].charAt(1) == 'G')
b = 3; else b = 0;
if(table_traduction[i][0].charAt(2) == 'C')
c = 1; elseif(table_traduction[i][0].charAt(2) =='T')
c = 2; elseif(table_traduction[i][0].charAt(2) == 'G')
c = 3; else c = 0;
nombre = a *((int)java.lang.Math.pow(4,2)) + b *((int)java.lang.Math.pow(4, 1)) + c *((int)java.lang.Math.pow(4,0));
traduction[nombre] = table_traduction[i][1]; }
adn = scanner.nextLine(); System.out.println(traduction(N, M, traduction, adn)); } }