

"""simple docstring"""





def 							_lowerCAmelCase   (    UpperCAmelCase  :				str					):


					'''simple docstring'''






					UpperCamelCase__		:     List[str]								=[]
					UpperCamelCase__		:     Tuple								=1

					for i in range(len(UpperCAmelCase					)					):
										if i + 1 < len(UpperCAmelCase					) and text[i] == text[i + 1]:
															count += 1
										else:
															encoded.append((text[i], count)					)
															UpperCamelCase__		:     Tuple								=1

					return encoded



def 							_lowerCAmelCase   (    UpperCAmelCase  :				list					):


					'''simple docstring'''






					return "".join(char * length for char, length in encoded					)


if __name__ == "__main__":
				from doctest import testmod

				testmod(name="""run_length_encode""", verbose=True)
				testmod(name="""run_length_decode""", verbose=True)





"""simple docstring"""





def 							_lowerCAmelCase   (    UpperCAmelCase  :				int   ,				UpperCAmelCase  :				int   ,				UpperCAmelCase  :				int					):


					'''simple docstring'''






					if power < 0:
										return -1
					base %= mod
					UpperCamelCase__		:     Any								=1

					while power > 0:
										if power & 1:
															UpperCamelCase__		:     Optional[Any]								=(result * base) % mod
										UpperCamelCase__		:     Union[str, Any]								=power >> 1
										UpperCamelCase__		:     Union[str, Any]								=(base * base) % mod

					return result



def 							_lowerCAmelCase   (    ):


					'''simple docstring'''






					print(modular_exponential(3   ,				200   ,				13					)					)


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				main()


