# table – Invertible congruence classes list

I am trying to create a list of invertible congruence classes $$bmod 120$$.

The code that I have is ```Table[If[{ModularInverse[i, 120]} = {}, 120, ModularInverse[i, 120]], {I, 0, 119}]```

If the modular inverse does not exist, it should return $$120$$. If it exists, it should return the integer corresponding to the inverse congruence class.

The code does not work as expected. If the modular inverse does not exist, it gives me a list with the unrated code, for example, `ModularInverse[0, 120]`.