#include #define NMAX 500005 using namespace std; int n,m,a[1005][1005]; int main(){ cin>>n; if (n!=3){ cout<