#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
vector<string> store;
int main() {
    string x;
    while(cin>>x){
        store.clear();
        for(int i=0;i<x.length();i++){
            store.push_back(x.substr(i));
        }
        sort(store.begin(),store.end());
        for(int i=0;i<store.size();i++){
            cout<<store[i]<<endl;
        }
    

    }
}