Fixed modular inverse printing.
Fixed incorrect output caused by number swapping.