I have done this code but the output is not like what I want

```
def replace(s,p,n):
    return "".join("{}".format(p) if not i % n else char for i, char in enumerate(s,1))

print(replace("university","-",3))

```

the output that I get is `un-ve-si-y`

I must get it like :
`uni-ver-sit-y`