output_description: Print `Yes` if the string `CF` can be obtained from the string s by deleting
  some characters. Otherwise print `No`.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      s
attempt: #! /usr/bin/env python3
  
  
  def main():
      d = 10**9 + 7
      ans = 1
      N = int(input())
      T = list(map(int, input().split()))
      A = list(map(int, input().split()))
      L = len(T)
      ST = [T[0]] + [0] * (L - 2) + [T[-1] if T[-1] != T[-2] else 0]
      SA = [A[0] if A[0] != A[1] else 0] + [0] * (L - 2) + [A[-1]]
      for i in range(0, L - 1):
          if T[i] == T[i - 1] and A[i] == A[i + 1]:
              ans = (ans * min(T[i], A[i])) % d
          else:
              if T[i] != T[i - 1]:
                  ST[i] = T[i]
              if A[i] != A[i + 1]:
                  SA[i] = A[i]
      mt = ma = 0
      for i in range(L):
          ma = max(ma, SA[i])
          mt = max(mt, ST[L - i - 1])
          if ST[i] and SA[i] and ST[i] != SA[i]:
              ans = 0
          if (ST[i] and ST[i] < ma) or (SA[-i - 1] and SA[-i - 1] < mt):
              ans = 0
      print(ans)
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  This contest is `CODEFESTIVAL`, which can be shortened to the string `CF` by
  deleting some characters.
  
  Mr. Takahashi, full of curiosity, wondered if he could obtain `CF` from other
  strings in the same way.
  
  You are given a string s consisting of uppercase English letters. Determine
  whether the string `CF` can be obtained from the string s by deleting some
  characters.
samples: [{"input": "CODEFESTIVAL", "output": "Yes\n    \n\n`CF` is obtained by deleting characters other than the first character `C` and\nthe fifth character `F`.\n\n* * *"}, {"input": "FESTIVALCODE", "output": "No\n    \n\n`FC` can be obtained but `CF` cannot be obtained because you cannot change the\norder of the characters.\n\n* * *"}, {"input": "CF", "output": "Yes\n    \n\nIt is also possible not to delete any characters.\n\n* * *"}, {"input": "FCF", "output": "Yes\n    \n\n`CF` is obtained by deleting the first character."}]