def rest(n):
	"""Number of ways to place the remaining n edges."""
	return n * 2 * rest(n - 1) if n > 1 else 1
c1 = 6 * rest(8)
c2 = 3 * rest(4) + 12 * rest(5)
c3 = 12 * rest(2) + 8 * rest(3)
c6 = 1
total = c1 - c2 + c3 - 10 * c6
lars = 30942374
print(total, lars, total - lars)