






import math






def 				A	(			a_   )	->		str:

					if number == 0:
										__UpperCamelCase :   Tuple									='Zero'
										return words
					else:
										__UpperCamelCase :   str									=math.logaa(a_   )
										__UpperCamelCase :   Tuple									=digits + 1
										__UpperCamelCase :   Tuple									={}
										__UpperCamelCase :   int									=''
										__UpperCamelCase :   Optional[int]									='One'
										__UpperCamelCase :   Union[str, Any]									='Two'
										__UpperCamelCase :   Dict									='Three'
										__UpperCamelCase :   str									='Four'
										__UpperCamelCase :   int									='Five'
										__UpperCamelCase :   int									='Six'
										__UpperCamelCase :   str									='Seven'
										__UpperCamelCase :   Tuple									='Eight'
										__UpperCamelCase :   Any									='Nine'

										__UpperCamelCase :   Union[str, Any]									={}
										__UpperCamelCase :   Optional[int]									=''
										__UpperCamelCase :   str									='Twenty'
										__UpperCamelCase :   Dict									='Thirty'
										__UpperCamelCase :   Union[str, Any]									='Forty'
										__UpperCamelCase :   int									='Fifty'
										__UpperCamelCase :   Union[str, Any]									='Sixty'
										__UpperCamelCase :   List[Any]									='Seventy'
										__UpperCamelCase :   int									='Eighty'
										__UpperCamelCase :   int									='Ninety'

										__UpperCamelCase :   Optional[Any]									={}
										__UpperCamelCase :   List[Any]									='Ten'
										__UpperCamelCase :   str									='Eleven'
										__UpperCamelCase :   Any									='Twelve'
										__UpperCamelCase :   int									='Thirteen'
										__UpperCamelCase :   Any									='Fourteen'
										__UpperCamelCase :   Optional[int]									='Fifteen'
										__UpperCamelCase :   str									='Sixteen'
										__UpperCamelCase :   Optional[int]									='Seventeen'
										__UpperCamelCase :   Optional[int]									='Eighteen'
										__UpperCamelCase :   str									='Nineteen'

										__UpperCamelCase :   Optional[Any]									={}
										__UpperCamelCase :   int									='Hundred,'
										__UpperCamelCase :   int									='Thousand,'
										__UpperCamelCase :   Optional[Any]									='Lakh,'
										__UpperCamelCase :   Union[str, Any]									='Crore,'

										__UpperCamelCase :   List[str]									=number
										__UpperCamelCase :   Optional[Any]									=''
										__UpperCamelCase :   Any									=0
										__UpperCamelCase :   List[str]									=int(a_   )
										while counter < digits:
															__UpperCamelCase :   int									=temp_num % 10
															if counter % 2 == 0:
																				__UpperCamelCase :   Dict									=''
																				if counter in placevalue and current != 0:
																									__UpperCamelCase :   Tuple									=placevalue[counter]
																				if counter == 2:
																									__UpperCamelCase :   Tuple									=singles[current] + addition + words
																				elif counter == 0:
																									if ((temp_num % 100) // 10) == 1:
																														__UpperCamelCase :   List[Any]									=teens[current] + addition + words
																														__UpperCamelCase :   Optional[Any]									=temp_num // 10
																														counter += 1
																									else:
																														__UpperCamelCase :   List[Any]									=singles[current] + addition + words

																				else:
																									__UpperCamelCase :   Optional[int]									=doubles[current] + addition + words

															else:
																				if counter == 1:
																									if current == 1:
																														__UpperCamelCase :   Any									=teens[number % 10] + words
																									else:
																														__UpperCamelCase :   Dict									=''
																														if counter in placevalue:
																																			__UpperCamelCase :   int									=placevalue[counter]
																														__UpperCamelCase :   Optional[Any]									=doubles[current] + addition + words
																				else:
																									__UpperCamelCase :   int									=''
																									if counter in placevalue:
																														if current == 0 and ((temp_num % 100) // 10) == 0:
																																			__UpperCamelCase :   int									=''
																														else:
																																			__UpperCamelCase :   List[Any]									=placevalue[counter]
																									if ((temp_num % 100) // 10) == 1:
																														__UpperCamelCase :   str									=teens[current] + addition + words
																														__UpperCamelCase :   Dict									=temp_num // 10
																														counter += 1
																									else:
																														__UpperCamelCase :   Any									=singles[current] + addition + words
															counter += 1
															__UpperCamelCase :   Dict									=temp_num // 10
					return words


if __name__ == "__main__":
							import doctest

							doctest.testmod()



def  A			(   lowercase					)  ->    int:
		'''simple docstring'''

		barcode //= 10  # exclude the last digit
		UpperCamelCase            =	False
		UpperCamelCase            =	0

		# extract and check each digit
		while barcode != 0:
				UpperCamelCase            =	1 if checker else 3
				s += mult * (barcode % 10)
				barcode //= 10
				UpperCamelCase            =	not checker

		return (10 - (s % 10)) % 10


def  A			(   lowercase					)  ->    bool:
		'''simple docstring'''

		return len(str(lowercase					)					) == 13 and get_check_digit(lowercase					) == barcode % 10


def  A			(   lowercase					)  ->    int:
		'''simple docstring'''

		if str(lowercase					).isalpha():
				UpperCamelCase            =	f'''Barcode \'{barcode}\' has alphabetic characters.'''
				raise ValueError(lowercase					)
		elif int(lowercase					) < 0:
				raise ValueError('The entered barcode has a negative value. Try again.'					)
		else:
				return int(lowercase					)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					_UpperCAmelCase   :					List[str]    =			get_barcode(input("Barcode: ").strip())

					if is_valid(barcode):
										print(F'''\'{barcode}\' is a valid barcode.''')
					else:
										print(F'''\'{barcode}\' is NOT a valid barcode.''')
