슬라이싱을 이용해 간단히 해결할 수 있었다.
S = input() li = [] for i in range(len(S)): li.append(S[i:]) li.sort() for i in li: print(i)