output_description: Print the number of strings satisfying the condition, modulo (10^9+7).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      K
      S
attempt: import sys                                                                                                                                                                                                  
                                                                                                                                                                                                              
  kMod = 10**9 + 7                                                                                                                                                                                            
                                                                                                                                                                                                              
  def read_int():                                                                                                                                                                                             
      l = sys.stdin.readline().rstrip('\n').split(' ')                                                                                                                                                        
      return int(l[0])                                                                                                                                                                                        
                                                                                                                                                                                                              
  def read_int_list():                                                                                                                                                                                        
      l = sys.stdin.readline().rstrip('\n').split(' ')                                                                                                                                                        
      return [int(i) for i in l]                                                                                                                                                                              
                                                                                                                                                                                                              
  K = read_int()                                                                                                                                                                                              
  S = sys.stdin.readline().rstrip('\n')                                                                                                                                                                       
                                                                                                                                                                                                              
  memo = {}                                                                                                                                                                                                   
  def cnt(n, rest):                                                                                                                                                                                           
      if n == 0:                                                                                                                                                                                              
          if rest > 0:                                                                                                                                                                                        
              return 0                                                                                                                                                                                        
          else:                                                                                                                                                                                               
              return 1                                                                                                                                                                                        
      key = (n, rest)                                                                                                                                                                                         
      if key in memo:                                                                                                                                                                                         
          return memo[key]                                                                                                                                                                                    
      ans = 0                                                                                                                                                                                                 
      ans += 25 * cnt(n-1, rest)                                                                                                                                                                              
      ans += cnt(n-1, rest-1)                                                                                                                                                                                 
      ans %= kMod                                                                                                                                                                                             
      memo[key] = ans                                                                                                                                                                                         
      return ans                                                                                                                                                                                              
                                                                                                                                                                                                              
  print(cnt(K+len(S), len(S)))
problem_description: Statement
  
  How many strings can be obtained by applying the following operation on a
  string S exactly K times: "choose one lowercase English letter and insert it
  somewhere"?
  
  The answer can be enormous, so print it modulo (10^9+7).
samples: [{"input": "5\n    oof", "output": "575111451\n    \n\nFor example, we can obtain `proofend`, `moonwolf`, and `onionpuf`, while we\ncannot obtain `oofsix`, `oofelevennn`, `voxafolt`, or `fooooooo`.\n\n* * *"}, {"input": "37564\n    whydidyoudesertme", "output": "318008117"}]