class Example:
	def __init__(self, name):
		self.name = name
	def __repr__(self):
		return f'Example({self.name!r})'
	def __add__(self, other):
		print(f"Evaluating {self} + {other}")
		return Example('addition result')
	def __mul__(self, other):
		print(f"Evaluating {self} * {other}")
		return Example('multiplication result')

a = Example('a')
b = Example('b')
c = Example('c')
d = Example('d')

a + b + c * d