function Main(input) {
  var arr = Array.from(input);
  var acgt = ['A','C','G','T'];
  var count = 0;
  var res = [];
  var len = 0;
  var str = '';

  arr.forEach(x => {
    if (acgt.indexOf(x) !== -1) {
      if (res[count] === undefined) {
        res[count] = [];
      }
      res[count].push(x);
    } else {
      count += 1;
    }
  })

  res.forEach(x => {
    var l = x.length;
    if (l > len) {
      len = l;
      str = x.join('');
    }
  })

  console.log(str);

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));