program atc
  implicit none
  character :: B
  read(*,*) B
  if(B.eq.'T') then
     write(*,'(a)') 'A'
  elseif(B.eq.'A') then
     write(*,'(a)') 'T'
  elseif(B.eq.'G') then
     write(*,'(a)') 'C'
  elseif(B.eq.'C') then
     write(*,'(a)') 'G'
  endif



end program

