#!/usr/bin/env python3
import numpy as np
import sys
n = int(sys.argv[1])
f = open('data.txt', 'wt')
f.write('%d\n'%n)
a = np.random.random(size=(n, n))
b = np.random.random(size=(n, n))
np.savetxt(f, a, fmt='%.5f')
np.savetxt(f, b, fmt='%.5f')
np.savetxt(f, np.mat(a) * np.mat(b), fmt='%.5f')
f.close()