



def 		a__      (		_UpperCamelCase      :			str			,_UpperCamelCase      :			str				):
   __lowerCamelCase    				=     len(_UpperCamelCase				) + 1
   __lowerCamelCase    				=     len(_UpperCamelCase				) + 1

   # dp is a 2d matrix where dp[i][j] denotes whether prefix string of
   # length i of input_string matches with prefix string of length j of
   # given pattern.
   # "dp" stands for dynamic programming.
   __lowerCamelCase    				=     [[0 for i in range(_UpperCamelCase				)] for j in range(_UpperCamelCase				)]

   # since string of zero length match pattern of zero length
   __lowerCamelCase    				=     1

   # since pattern of zero length will never match with string of non-zero length
   for i in range(1			,_UpperCamelCase				):
      __lowerCamelCase    				=     0

   # since string of zero length will match with pattern where there
   # is at least one * alternatively
   for j in range(1			,_UpperCamelCase				):
      __lowerCamelCase    				=     dp[0][j - 2] if pattern[j - 1] == '''*''' else 0

   # now using bottom-up approach to find for all remaining lengths
   for i in range(1			,_UpperCamelCase				):
      for j in range(1			,_UpperCamelCase				):
         if input_string[i - 1] == pattern[j - 1] or pattern[j - 1] == ".":
            __lowerCamelCase    				=     dp[i - 1][j - 1]

         elif pattern[j - 1] == "*":
            if dp[i][j - 2] == 1:
               __lowerCamelCase    				=     1
            elif pattern[j - 2] in (input_string[i - 1], "."):
               __lowerCamelCase    				=     dp[i - 1][j]
            else:
               __lowerCamelCase    				=     0
         else:
            __lowerCamelCase    				=     0

   return bool(dp[-1][-1]				)


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  # inputing the strings
  # input_string = input("input a string :")
  # pattern = input("input a pattern :")

  a_								=       """aab"""
  a_								=       """c*a*b"""

  # using function to check whether given string matches the given pattern
  if match_pattern(input_string, pattern):
    print(f"{input_string} matches the given pattern {pattern}")
  else:
    print(f"{input_string} does not match with the given pattern {pattern}")











from __future__ import annotations





def 		a__      (		_UpperCamelCase      :			int | float | str			,_UpperCamelCase      :			int | float | str				):
   if nth_term == "":
      return [""]
   __lowerCamelCase    				=     int(_UpperCamelCase				)
   __lowerCamelCase    				=     int(_UpperCamelCase				)
   __lowerCamelCase    				=     []
   for temp in range(int(_UpperCamelCase				)				):
      series.append(F"""1 / {pow(temp + 1			,int(_UpperCamelCase				)				)}""" if series else '''1'''				)
   return series


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  a_								=       int(input("""Enter the last number (nth term) of the P-Series"""))
  a_								=       int(input("""Enter the power for  P-Series"""))
  print("""Formula of P-Series => 1+1/2^p+1/3^p ..... 1/n^p""")
  print(p_series(nth_term, power))






