object Main extends App {
  /* 標準入力を読む */
  val stdinChar = io.StdIn.readLine

  /* 対になる文字列を返す
  * A->T
  * T->A
  * C->G
  * G->C
  * */
  val map: Map[Char,String] = Map('A'->"T",'T'->"A",'C'->"G",'G'->"C")

  println(map(stdinChar.head))
}