from typing import Callable


def ret_print(func: Callable) -> Callable:
    """Transforms the function to print its returned value."""
    def g(*args):
        result = func(*args)
        print(str(result))
        return result
    return g