import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
import std.math;

void main() {
	auto S = readln.split[0];
    auto cnt = 0;
    string ans, ans2;
  while (cnt < S.length) {
    if ( S[cnt] == 'A' || S[cnt] == 'T' || S[cnt] == 'G' || S[cnt] == 'C') {
        ans2 ~= S[cnt];
    }
    else {
        if (ans2.length > ans.length) ans = ans2;
        ans2 = ""; 
    }
      cnt++;
  }
  ans.writeln;
}
