def factorial(n):
  if n == 0:
    return 1
  else:
    fact = n * factorial(n - 1)
    print('factorial of {}: {}'.format(n, fact))
    return fact

print(factorial(5))