def pstring(state, num):
	"""Return a nice string give a state and its count.

	Example:
	>>> pstring(X(0,-1,1),4)
	( 0, *, 1) :  4

	"""
	if len(state.v) == 4:
		a, b, c, d = state.v

		return f"({a:2},{b:2},{c:2},{d:2})_{state.s} : {num:2}"
	elif len(state.v) == 3:
		a, b, c = state.v
		if b == -1: 
			b = " *"
		return f"({a:2},{b:2},{c:2})_{state.s}    : {num:2}"