
from __future__ import annotations

from dataclasses import dataclass




@dataclass
class   __lowercase						:
	_A       =   42
	_A       =   None
	_A       =   None



def 		UpperCamelCase     (       _UpperCAmelCase  :   TreeNode | None  )   ->			bool:






						'''simple docstring'''

						def is_valid_tree(_UpperCAmelCase  :   TreeNode | None  ) -> bool:
												if node is None:
																		return True

												if not isinstance(_UpperCAmelCase ,			_UpperCAmelCase  ):
																		return False

												try:
																		float(node.data  )
												except (TypeError, ValueError):
																		return False

												return is_valid_tree(node.left  ) and is_valid_tree(node.right  )

						if not is_valid_tree(_UpperCAmelCase  ):
												raise ValueError(
												    "Each node should be type of TreeNode and data should be float."  )

						def is_binary_search_tree_recursive_check(
						    _UpperCAmelCase  :   TreeNode | None ,			_UpperCAmelCase  :   float ,			_UpperCAmelCase  :   float  ) -> bool:

												if node is None:
																		return True

												return (
												    left_bound < node.data < right_bound
												    and is_binary_search_tree_recursive_check(node.left ,			_UpperCAmelCase ,			node.data  )
												    and is_binary_search_tree_recursive_check(
												        node.right ,			node.data ,			_UpperCAmelCase  )
												)

						return is_binary_search_tree_recursive_check(_UpperCAmelCase ,			-float("inf"  ) ,			float("inf"  )  )


if __name__ == "__main__":
							import doctest

							doctest.testmod()






def 		UpperCamelCase     (       _UpperCAmelCase  :   str  )   ->			bool:






						'''simple docstring'''

						_lowercase       :	List[str]           =   [int(_UpperCAmelCase  ) for i in ip_va_address.split("."  ) if i.isdigit()]
						return len(_UpperCAmelCase  ) == 4 and all(0 <= int(_UpperCAmelCase  ) <= 254 for octet in octets  )


if __name__ == "__main__":
							UpperCamelCase_						:     Dict	       =							input().strip()
							UpperCamelCase_						:     List[Any]	       =							"""valid""" if is_ip_va_address_valid(ip) else """invalid"""
							print(f'''{ip} is a {valid_or_invalid} IP v4 address.''')




