human
Give me a code to find the good permutation of first N natural numbers and the other steps required given the following:
Find the good permutation of first N natural numbers | Function to print the good permutation of first N natural numbers.
If n is odd.
Otherwise.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to find the good permutation of first N natural numbers and the other steps required.
 def printPermutation ( n ) :
	if ( n % 2 != 0 ) :
		print ( - 1 ) ;
	else :
		for i in range ( 1 , ( n // 2 ) + 1 ) :
			print ( ( 2 * i ) , ( 2 * i - 1 ) , end = " ▁ " ) ;
n = 4 ;
printPermutation ( n ) ;