


def        snake_case_					(  snake_case					)  ->    Union[str, Any]:
							if not head:
														return True
							# split the list to two parts
							lowercase__      ,						lowercase__:       Dict        =       head.next, head
							while fast and fast.next:
														lowercase__:       Dict        =       fast.next.next
														lowercase__:       Optional[int]        =       slow.next
							lowercase__:       Tuple        =       slow.next
							lowercase__:       List[str]        =       None  # Don't forget here! But forget still works!
							# reverse the second part
							lowercase__:       Optional[int]        =       None
							while second:
														lowercase__:       str        =       second.next
														lowercase__:       int        =       node
														lowercase__:       Tuple        =       second
														lowercase__:       Dict        =       nxt
							# compare two parts
							# second part has the same or one less node
							while node:
														if node.val != head.val:
																					return False
														lowercase__:       Tuple        =       node.next
														lowercase__:       List[Any]        =       head.next
							return True




def        snake_case_					(  snake_case					)  ->    List[str]:
							if not head or not head.next:
														return True

							# 1. Get the midpoint (slow)
							lowercase__:       Optional[Any]        =       head
							while fast and fast.next:
														lowercase__      ,						lowercase__:       Optional[int]        =       fast.next.next, slow.next

							# 2. Push the second half into the stack
							lowercase__:       Dict        =       [slow.val]
							while slow.next:
														lowercase__:       Optional[Any]        =       slow.next
														stack.append(slow.val					)

							# 3. Comparison
							while stack:
														if stack.pop() != cur.val:
																					return False
														lowercase__:       Tuple        =       cur.next

							return True




def        snake_case_					(  snake_case					)  ->    Any:
							if not head or not head.next:
														return True
							lowercase__:       List[str]        =       {}
							lowercase__:       int        =       0
							while head:
														if head.val in d:
																					d[head.val].append(snake_case_					)
														else:
																					lowercase__:       int        =       [pos]
														lowercase__:       Any        =       head.next
														pos += 1
							lowercase__:       int        =       pos - 1
							lowercase__:       str        =       0
							for v in d.values():
														if len(snake_case_					) % 2 != 0:
																					middle += 1
														else:
																					lowercase__:       Union[str, Any]        =       0
																					for i in range(0      ,							len(snake_case_					)					):
																												if v[i] + v[len(snake_case_					) - 1 - step] != checksum:
																																			return False
																												step += 1
														if middle > 1:
																					return False
							return True






from __future__ import annotations




def        snake_case_					(  snake_case      ,							snake_case					)  ->    list[str]:
       if nth_term == "":
              return [""]
       lowercase__:       Tuple        =       int(snake_case					)
       lowercase__:       int        =       int(snake_case					)
       lowercase__:       list[str]        =       []
       for temp in range(int(snake_case					)					):
              series.append(f'1 / {pow(temp + 1      ,							int(snake_case					)					)}' if series else '1'					)
       return series


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 __lowerCAmelCase			=							int(input('''Enter the last number (nth term) of the P-Series'''))
 __lowerCAmelCase			=							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))


