module Main where

import Control.Monad
import Data.Array.IO
import qualified Data.Vector as V

main :: IO ()
main = do
  x <- getChar
  case x of
    'A' -> putStrLn "T"
    'T' -> putStrLn "A"
    'G' -> putStrLn "C"
    'C' -> putStrLn "G"

solve = 0

getInt :: IO Int
getInt = read <$> getLine

getInts :: IO [Int]
getInts = map read . words <$> getLine

getIntLines :: Int -> IO [Int]
getIntLines i = replicateM i getInt

getStrLines :: Int -> IO [String]
getStrLines i = replicateM i getLine
