human
Construct a Matrix with no element exceeding X and sum of two adjacent elements not exceeding Y | Function to print the required matrix.
For 1 * 1 matrix.
Greater number.
Smaller number.
Sets / Resets for alternate filling of the matrix.
Print the matrix.
If end of row is reached.
Driver Code"
Solution in Python:

=====
Can you provide a code to construct a Matrix with no element exceeding X and sum of two adjacent elements not exceeding Y and the other steps required?
assistant
#Here is code to construct a Matrix with no element exceeding X and sum of two adjacent elements not exceeding Y and the other steps required.
 def FindMatrix ( n , m , x , y ) :
	if ( n * m == 1 ) :
		if ( x > y ) :
			print ( y )
		else :
			print ( x )
		return
	a = min ( x , y )
	b = min ( 2 * x , y ) - a
	flag = True
	for i in range ( n ) :
		for j in range ( m ) :
			if ( flag ) :
				print ( a , end = " ▁ " )
			else :
				print ( b , end = " ▁ " )
			flag = not flag
		if ( ( ( n % 2 != 0 and m % 2 == 0 ) or ( n % 2 == 0 and m % 2 == 0 ) ) ) :
			flag = not flag
		print ( )
N = 3
M = 3
X = 5
Y = 3
FindMatrix ( N , M , X , Y )