




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


a__		     =     {'''configuration_swin''': ['''SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''SwinConfig''', '''SwinOnnxConfig''']}


try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	a__		     =     [
	    '''SWIN_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''SwinForImageClassification''',
	    '''SwinForMaskedImageModeling''',
	    '''SwinModel''',
	    '''SwinPreTrainedModel''',
	    '''SwinBackbone''',
	]

try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	a__		     =     [
	    '''TF_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''TFSwinForImageClassification''',
	    '''TFSwinForMaskedImageModeling''',
	    '''TFSwinModel''',
	    '''TFSwinPreTrainedModel''',
	]

if TYPE_CHECKING:
	from .configuration_swin import SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinConfig, SwinOnnxConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_swin import (
		    SWIN_PRETRAINED_MODEL_ARCHIVE_LIST,
		    SwinBackbone,
		    SwinForImageClassification,
		    SwinForMaskedImageModeling,
		    SwinModel,
		    SwinPreTrainedModel,
		)

	try:
		if not is_tf_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_tf_swin import (
		    TF_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFSwinForImageClassification,
		    TFSwinForMaskedImageModeling,
		    TFSwinModel,
		    TFSwinPreTrainedModel,
		)

else:
	import sys

	a__		     =     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)












from collections import defaultdict





def 				A__ (snake_case   :		int				)     ->						int:
					__UpperCamelCase					:	Optional[int]             =      1
					__UpperCamelCase					:	Tuple             =      True
					for v in tree[start]:
										if v not in visited:
															ret += dfs(snake_case				)
					if ret % 2 == 0:
										cuts.append(snake_case				)
					return ret





def 				A__ ()     ->						str:
					dfs(1				)


if __name__ == "__main__":
	a__     ,							a__		     =     10, 9
	a__		     =     defaultdict(list)
	a__		     =     {}
	a__		     =     []
	a__		     =     0
	a__		     =     [(2, 1), (3, 1), (4, 3), (5, 2), (6, 1), (7, 2), (8, 6), (9, 8), (10, 8)]
	for u, v in edges:
		tree[u].append(v)
		tree[v].append(u)
	even_tree()
	print(len(cuts) - 1)






