output_description: If S is a KEYENCE string, print `YES`; otherwise, print `NO`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: # _*_ coding:utf-8 _*_
  #  Atcoder_KeyencePrograming_Contest-B
  #  TODO https://keyence2019.contest.atcoder.jp/tasks/keyence2019_b
  import re
  
  
  def solveProblem(inputStr):
      pattern1 = r".*keyence"
      pattern2 = r"k.*eyence"
      pattern3 = r"ke.*yence"
      pattern4 = r"key.*ence"
      pattern5 = r"keye.*nce"
      pattern6 = r"keyen.*ce"
      pattern7 = r"keyenc.*e"
      pattern8 = r"keyence.*"
      matchOB1 = re.search(pattern1, inputStr)
      matchOB2 = re.search(pattern2, inputStr)
      matchOB3 = re.search(pattern3, inputStr)
      matchOB4 = re.search(pattern4, inputStr)
      matchOB5 = re.search(pattern5, inputStr)
      matchOB6 = re.search(pattern6, inputStr)
      matchOB7 = re.search(pattern7, inputStr)
      matchOB8 = re.search(pattern8, inputStr)
      if matchOB1 != None:
          return "YES"
      if matchOB2 != None:
          return "YES"
      if matchOB3 != None:
          return "YES"
      if matchOB4 != None:
          return "YES"
      if matchOB5 != None:
          return "YES"
      if matchOB6 != None:
          return "Yes"
      if matchOB7 != None:
          return "YES"
      if matchOB8 != None:
          return "YES"
      return "NO"
  
  
  if __name__ == "__main__":
      S = input().strip()
      solution = solveProblem(S)
      print("{}".format(solution))
  
problem_description: Statement
  
  A string is called a KEYENCE string when it can be changed to `keyence` by
  removing its contiguous substring (possibly empty) only once.
  
  Given a string S consisting of lowercase English letters, determine if S is a
  KEYENCE string.
samples: [{"input": "keyofscience", "output": "YES\n    \n\n`keyence` is an abbreviation of `key of science`.\n\n* * *"}, {"input": "mpyszsbznf", "output": "NO\n    \n\n* * *"}, {"input": "ashlfyha", "output": "NO\n    \n\n* * *"}, {"input": "keyence", "output": "YES"}]