// Learn more about F# at http://fsharp.org

open System

[<EntryPoint>]
let main _argv =
    stdin.ReadLine()
    |> (fun s ->
         match s with
         | "A" -> "T"
         | "T" -> "A"
         | "C" -> "G"
         | "G" -> "C"
         | _ -> "Invalid")
    |> printfn "%s"
    
    0 // return an integer exit code
