program abc_a
  character(1) nuc
  read *, nuc
  select case(nuc)
    case ('A')
      print '(A)', 'T'
    case ('T')
      print '(A)', 'A'
    case ('C')
      print '(A)', 'G'
    case ('G')
      print '(A)', 'C'
  end select
end program
