output_description: Print the letter representing the base that bonds with the base b.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      b
attempt: n = int(input())
  mod = 10**9 + 7
  
  dp = [[[[0] * 4 for _ in range(4)] for _ in range(4)] for _ in range(n + 1)]
  # 長さ0の文字列は1
  # 0,1,2(A,G,C)に関する制約しかないため
  # Sは、TTTSと考えてもよい
  dp[0][3][3][3] = 1
  
  # swapしてAGCが発生しない文字列:=AGC,ACG,GAC,A?GC,AG?Cを含まない文字列
  # A:=0,G:=1,C:=2,T:=3
  
  # 文字列の文字数
  for i in range(n):
      # 最後から1文字目
      for j in range(4):
          # 最後から2文字目
          for k in range(4):
              # 条件に当てはまるものがない場合
              if dp[i][j][k] == 0:
                  continue
              # 最後から3文字目
              for l in range(4):
                  # 新たに追加する文字
                  for a in range(4):
                      # ダメな5条件をカット
  
                      # AGCの場合
                      if a == 2 and j == 1 and k == 0:
                          continue
                      # GACの場合
                      if a == 2 and j == 0 and k == 1:
                          continue
                      # ACGの場合
                      if a == 1 and j == 2 and k == 0:
                          continue
                      # A?GCの場合
                      if a == 2 and j == 1 and l == 0:
                          continue
                      # AG?Cの場合
                      if a == 2 and k == 1 and l == 0:
                          continue
  
                      # ダメの条件を抜けると、aを足した文字列が作れる
                      dp[i + 1][a][j][k] += dp[i][j][k][l]
                      dp[i + 1][a][j][k] %= mod
  
  ans = 0
  for j in range(4):
      for k in range(4):
          for l in range(4):
              # 長さnの全通り回収
              ans += dp[n][j][k][l]
              ans %= mod
  print(ans)
  
problem_description: 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.
samples: [{"input": "A", "output": "T\n    \n\n* * *"}, {"input": "G", "output": "C"}]