import numpy as np
n_microstates = 0
nlevels = 3
for p1 in range(nlevels):
for p2 in range(nlevels):
iconfig = np.zeros(nlevels)
iconfig[p1] += 1
iconfig[p2] += 1
n_microstates += 1
print('%s' % str(iconfig))
print(n_microstates)