
"""simple docstring"""


class  __lowerCamelCase  :




				def __init__(				self   ):
							lowerCamelCase_					=  ''''''
							lowerCamelCase_					=  ''''''
							lowerCamelCase_					=  []




				def        UpperCAmelCase__						(				self							,						UpperCAmelCase							,						UpperCAmelCase   ):
							if m == -1:
										return n + 1
							elif n == -1:
										return m + 1
							elif self.dp[m][n] > -1:
										return self.dp[m][n]
							else:
										if self.worda[m] == self.worda[n]:
													lowerCamelCase_					=  self.__min_dist_top_down_dp(m - 1							,						n - 1   )
										else:
													lowerCamelCase_					=  self.__min_dist_top_down_dp(UpperCAmelCase							,						n - 1   )
													lowerCamelCase_					=  self.__min_dist_top_down_dp(m - 1							,						UpperCAmelCase   )
													lowerCamelCase_					=  self.__min_dist_top_down_dp(m - 1							,						n - 1   )
													lowerCamelCase_					=  1 + min(UpperCAmelCase							,						UpperCAmelCase							,						UpperCAmelCase   )

										return self.dp[m][n]




				def        UpperCAmelCase__						(				self							,						UpperCAmelCase							,						UpperCAmelCase   ):
							lowerCamelCase_					=  worda
							lowerCamelCase_					=  worda
							lowerCamelCase_					=  [[-1 for _ in range(len(UpperCAmelCase   )   )] for _ in range(len(UpperCAmelCase   )   )]

							return self.__min_dist_top_down_dp(len(UpperCAmelCase   ) - 1							,						len(UpperCAmelCase   ) - 1   )





				def        UpperCAmelCase__						(				self							,						UpperCAmelCase							,						UpperCAmelCase   ):
							lowerCamelCase_					=  worda
							lowerCamelCase_					=  worda
							lowerCamelCase_					=  len(UpperCAmelCase   )
							lowerCamelCase_					=  len(UpperCAmelCase   )
							lowerCamelCase_					=  [[0 for _ in range(n + 1   )] for _ in range(m + 1   )]

							for i in range(m + 1   ):
										for j in range(n + 1   ):
													if i == 0:  # first string is empty
																lowerCamelCase_					=  j
													elif j == 0:  # second string is empty
																lowerCamelCase_					=  i
													elif worda[i - 1] == worda[j - 1]:  # last characters are equal
																lowerCamelCase_					=  self.dp[i - 1][j - 1]
													else:
																lowerCamelCase_					=  self.dp[i][j - 1]
																lowerCamelCase_					=  self.dp[i - 1][j]
																lowerCamelCase_					=  self.dp[i - 1][j - 1]
																lowerCamelCase_					=  1 + min(UpperCAmelCase							,						UpperCAmelCase							,						UpperCAmelCase   )
							return self.dp[m][n]


if __name__ == "__main__":
						A_    							=					EditDistance()

						print("""****************** Testing Edit Distance DP Algorithm ******************""")
						print()

						A_    							=					input("""Enter the first string: """).strip()
						A_    							=					input("""Enter the second string: """).strip()

						print()
						print(f"The minimum edit distance is: {solver.min_dist_top_down(Sa, Sa)}")
						print(f"The minimum edit distance is: {solver.min_dist_bottom_up(Sa, Sa)}")
						print()
						print("""*************** End of Testing Edit Distance DP Algorithm ***************""")











from __future__ import annotations

import json

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

_UpperCamelCase			:	Union[str, Any]								={'UserAgent': UserAgent().random}



def  a__ (__lowercase							:Optional[Any]   )		-> dict:
				_A	:				str   =      script.contents[0]
				_A	:				Dict   =      json.loads(data[data.find('''{"config"'''   ) : -1]   )
				return info["entry_data"]["ProfilePage"][0]["graphql"]["user"]






class 						UpperCAmelCase__ :







		def __init__(					self       ,A__		):
						_A	:				Any   =      f"""https://www.instagram.com/{username}/"""
						_A	:				Optional[Any]   =      self.get_json()







		def  A__      (					self		):
						_A	:				str   =      requests.get(self.url       ,headers=A__		).text
						_A	:				Dict   =      BeautifulSoup(A__       ,'''html.parser'''		).find_all('''script'''		)
						try:
										return extract_user_profile(scripts[4]		)
						except (json.decoder.JSONDecodeError, KeyError):
										return extract_user_profile(scripts[3]		)







		def __repr__(					self		):
						return f"""{self.__class__.__name__}('{self.username}')"""







		def __str__(					self		):
						return f"""{self.fullname} ({self.username}) is {self.biography}"""







		@property
		def  A__      (					self		):
						return self.user_data["username"]







		@property
		def  A__      (					self		):
						return self.user_data["full_name"]







		@property
		def  A__      (					self		):
						return self.user_data["biography"]







		@property
		def  A__      (					self		):
						return self.user_data["business_email"]







		@property
		def  A__      (					self		):
						return self.user_data["external_url"]







		@property
		def  A__      (					self		):
						return self.user_data["edge_followed_by"]["count"]







		@property
		def  A__      (					self		):
						return self.user_data["edge_follow"]["count"]







		@property
		def  A__      (					self		):
						return self.user_data["edge_owner_to_timeline_media"]["count"]







		@property
		def  A__      (					self		):
						return self.user_data["profile_pic_url_hd"]







		@property
		def  A__      (					self		):
						return self.user_data["is_verified"]







		@property
		def  A__      (					self		):
						return self.user_data["is_private"]



def  a__ (__lowercase							:str = "github"   )		-> None:
				import os

				if os.environ.get('''CI'''   ):
								return  # test failing on GitHub Actions
				_A	:				Optional[int]   =      InstagramUser(__lowercase   )
				assert instagram_user.user_data
				assert isinstance(instagram_user.user_data					,  __lowercase   )
				assert instagram_user.username == username
				if username != "github":
								return
				assert instagram_user.fullname == "GitHub"
				assert instagram_user.biography == "Built for developers."
				assert instagram_user.number_of_posts > 150
				assert instagram_user.number_of_followers > 12_0000
				assert instagram_user.number_of_followings > 15
				assert instagram_user.email == "support@github.com"
				assert instagram_user.website == "https://github.com/readme"
				assert instagram_user.profile_picture_url.startswith('''https://instagram.'''   )
				assert instagram_user.is_verified is True
				assert instagram_user.is_private is False


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	_UpperCamelCase			:	List[Any]								=InstagramUser('github')
	print(instagram_user)
	print(f'''{instagram_user.number_of_posts = }''')
	print(f'''{instagram_user.number_of_followers = }''')
	print(f'''{instagram_user.number_of_followings = }''')
	print(f'''{instagram_user.email = }''')
	print(f'''{instagram_user.website = }''')
	print(f'''{instagram_user.profile_picture_url = }''')
	print(f'''{instagram_user.is_verified = }''')
	print(f'''{instagram_user.is_private = }''')



