Note that in this question, the set starts from **1** instead of **0** in the previous question, so we have to minus one after getting mod inverse.
```python=
import string
instr="268 413 438 313 426 337 272 188 392 338 77 332 139 113 92 239 247 120 419 72 295 190 131 "
set=string.ascii_uppercase+string.digits+'_'
list1=instr.split()
print(list1)
for i in range(len(list1)):
mod_inverse=pow(int(list1[i]), -1, 41)
# print(list1[i],mod_inverse)
print(set[mod_inverse-1],end="")
```
output:
```shell
┌──(kali㉿kali)-[~/code]
└─$ /bin/python /home/kali/code/basic_mod_2.py
['268', '413', '438', '313', '426', '337', '272', '188', '392', '338', '77', '332', '139', '113', '92', '239', '247', '120', '419', '72', '295', '190', '131']
1NV3R53LY_H4RD_8A05D939
```
ref:
- how to find mod inverse: https://stackoverflow.com/questions/4798654/modular-multiplicative-inverse-function-in-python