






from __future__ import annotations

from collections import deque



class 							SCREAMING_SNAKE_CASE__						:





					"""simple docstring"""






					def __init__( self					:  Dict							,		__A					:  List[Any]	):
						snake_case__			:				int       =  []
						self.adlist.append(
						    {"value": "", "next_states": [], "fail_state": 0, "output": []}	)

						for keyword in keywords:
							self.add_keyword(a__	)
						self.set_fail_transitions()



					def 	_lowercase					( self					:  Union[str, Any]							,		__A					:  Dict							,		__A					:  str	):
						for state in self.adlist[current_state]["next_states"]:
							if char == self.adlist[state]["value"]:
								return state
						return None



					def 	_lowercase					( self					:  Any							,		__A					:  str	):
						snake_case__			:				Union[str, Any]       =  0
						for character in keyword:
							snake_case__			:				Optional[int]       =  self.find_next_state(a__							,		a__	)
							if next_state is None:
								self.adlist.append(
								    {
								        "value": character,
								        "next_states": [],
								        "fail_state": 0,
								        "output": [],
								    }	)
								self.adlist[current_state]["next_states"].append(len(self.adlist	) - 1	)
								snake_case__			:				List[str]       =  len(self.adlist	) - 1
							else:
								snake_case__			:				List[Any]       =  next_state
						self.adlist[current_state]["output"].append(a__	)



					def 	_lowercase					( self					:  int	):
						snake_case__			:				List[Any]       =  deque()
						for node in self.adlist[0]["next_states"]:
							q.append(a__	)
							snake_case__			:				List[str]       =  0
						while q:
							snake_case__			:				Dict       =  q.popleft()
							for child in self.adlist[r]["next_states"]:
								q.append(a__	)
								snake_case__			:				List[Any]       =  self.adlist[r]["fail_state"]
								while (
								    self.find_next_state(a__							,		self.adlist[child]["value"]	) is None
								    and state != 0
								):
									snake_case__			:				Dict       =  self.adlist[state]["fail_state"]
								snake_case__			:				Tuple       =  self.find_next_state(
								    a__							,		self.adlist[child]["value"]	)
								if self.adlist[child]["fail_state"] is None:
									snake_case__			:				int       =  0
								snake_case__			:				Union[str, Any]       =  (
								    self.adlist[child]["output"]
								    + self.adlist[self.adlist[child]["fail_state"]]["output"]
								)






					def 	_lowercase					( self					:  str							,		__A					:  List[Any]	):
						snake_case__			:				Tuple       =  {}  # returns a dict with keywords and list of its occurrences
						snake_case__			:				str       =  0
						for i in range(len(a__	)	):
							while (
							    self.find_next_state(a__							,		string[i]	) is None
							    and current_state != 0
							):
								snake_case__			:				Optional[int]       =  self.adlist[current_state]["fail_state"]
							snake_case__			:				Optional[int]       =  self.find_next_state(a__							,		string[i]	)
							if next_state is None:
								snake_case__			:				List[Any]       =  0
							else:
								snake_case__			:				Dict       =  next_state
								for key in self.adlist[current_state]["output"]:
									if key not in result:
										snake_case__			:				Dict       =  []
									result[key].append(i - len(a__	) + 1	)
						return result


if __name__ == "__main__":
	import doctest

	doctest.testmod()











def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							int					,  snake_case_ :							float					,  snake_case_ :							float       ):
	return round(float(moles / volume       ) * nfactor       )







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							float					,  snake_case_ :							float					,  snake_case_ :							float       ):
	return round(float((moles * 0.08_21 * temperature) / (volume)       )       )







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							float					,  snake_case_ :							float					,  snake_case_ :							float       ):
	return round(float((moles * 0.08_21 * temperature) / (pressure)       )       )







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							float					,  snake_case_ :							float					,  snake_case_ :							float       ):
	return round(float((pressure * volume) / (0.08_21 * moles)       )       )


if __name__ == "__main__":
	import doctest

	doctest.testmod()



