TLE in PERMUT2

Link to my solution : CodeChef: Practical coding for everyone
though logic is so simple and does not take much time to run on custom inputs. it exceeds the time limit. can anyone explains why that happens?

the expected complexity is O(n), but your solution is O(n^2). The funcion “index” runs through the entire list to find a element.

for i in range(len(list1)):
    list2.append(list1.index(i+1)+1)