DNA = {}

with open("rosalind_gc.txt") as f:
	for line in f:
		if line[0] == '>':
			s = line.split()
			current_dna = s[0].replace('>','')
			DNA[current_dna] = ''
		
		else:
			DNA[current_dna] += line

for entry in DNA:
	DNA[entry] = DNA[entry].replace('\n','')	

DNA_GC = {}

for entry in DNA:
	DNA_GC[entry] = float(DNA[entry].count('G') + DNA[entry].count('C')) / float(len(DNA[entry]))

max_GC = 0
	
for entry in DNA_GC:
	if DNA_GC[entry] > max_GC:
		max_GC = DNA_GC[entry]
		max_DNA = entry
		
print max_DNA
print max_GC * 100
