open System

[<EntryPoint>]
let main argv =
    Console.ReadLine()
    |> function
       | "A" -> "T"
       | "T" -> "A"
       | "C" -> "G"
       | "G" -> "C"
       | _ -> ""
    |> printfn "%s"
    0
