Problem:
Score : 100 points

Problem Statement

On the Planet AtCoder, there are four types of bases: A, C, G and T. A bonds with T, and C bonds with G.

You are given a letter b as input, which is A, C, G or T. Write a program that prints the letter representing the base that bonds with the base b.

Constraints

b is one of the letters A, C, G and T.

Input

Input is given from Standard Input in the following format:

b

Output

Print the letter representing the base that bonds with the base b.

Sample Input 1

A

Sample Output 1

T

Sample Input 2

G

Sample Output 2

C

Solution in Ruby (2.3.3) (judge verdict: Accepted)

# AtCoder 星には四種類の塩基 A, C, G, T が存在し、A と T、C と G がそれぞれ対になります。
# 文字 b が入力されます。これは A, C, G, T のいずれかです。
# 塩基 b と対になる塩基を表す文字を出力するプログラムを書いてください。

b = gets.chomp

case b
when "A"
    puts "T"
when "T"
    puts "A"
when "C"
    puts "G"
when "G"
    puts "C"
end