import sys def max_mat(a,n): global result2 global index a.sort() for i in range(n): if a[i]>=0: index=i break else: pass if n>=3: result1= a[-1]*a[-2]*a[-3] if index>1: result2=a[0]*a[1]*a...