a = input() b = int(input()) num_max = sum(1 if i in ['G','C'] else 0 for i in a[0:b]) num = num_max j = 0 for i in range(0, len(a)-b): num = num + (1 if a[i+b] in ['G','C'] else 0) - (1 if a[i] in ['G','C'] else 0) if num > num_max: num_max = num j = i + 1 print(a[j:j+b...