code: 
  
  
  
  def  __a  (					lowerCAmelCase_     :      int       )   ->				int:
  
  
  
  
  
  
  						'''simple docstring'''
  
  
  
  						if not isinstance(lowerCAmelCase_    ,lowerCAmelCase_       ):
  												raise ValueError("""double_factorial() only accepts integral values"""       )
  						if num < 0:
  												raise ValueError("""double_factorial() not defined for negative values"""       )
  						UpperCAmelCase_=     1
  						for i in range(lowerCAmelCase_    ,0    ,-2       ):
  												value *= i
  						return value
  
  
  if __name__ == "__main__":
  	import doctest
  
  	doctest.testmod()
  
  
  
  
  
style_context: 
  
  
  
  from __future__ import annotations
  
  
  
  def  __a  (					lowerCAmelCase_     :      int       )   ->				int | None:
  
  
  
  
  
  
  						'''simple docstring'''
  
  
  
  						for r in range(1    ,lowerCAmelCase_       ):
  												UpperCAmelCase_=     []
  												for x in range(n - 1       ):
  																		UpperCAmelCase_=     pow(lowerCAmelCase_    ,lowerCAmelCase_    ,lowerCAmelCase_       )
  																		if val in li:
  																								break
  																		li.append(lowerCAmelCase_       )
  												else:
  																		return r
  						return None
  
  
  if __name__ == "__main__":
  	__A       					=		int(input('''Enter a prime number q: '''))
  	__A       					=		find_primitive(q)
  	if a is None:
  		print(f'Cannot find the primitive for the value: {a!r}')
  	else:
  		__A       					=		int(input('''Enter private key of A: '''))
  		__A       					=		pow(a, a_private, q)
  		__A       					=		int(input('''Enter private key of B: '''))
  		__A       					=		pow(a, b_private, q)
  
  		__A       					=		pow(b_public, a_private, q)
  		__A       					=		pow(a_public, b_private, q)
  
  		print('''The key value generated by A is: ''', a_secret)
  		print('''The key value generated by B is: ''', b_secret)
  
  
  
  
  