Z=x^y mod n