include<iostream>
include<string>
include<vector>
include<algorithm>
using namespace std;
int main()
{
string s;
while(cin>>s)
{
int leth = s.length();
vector<string> vs;
for(int i=0;i<leth;i++)
{
string subs = s;
subs.erase(0,i);
vs.push_back(subs);
}
sort(vs.begin(),vs.end());
for(vector<string>::iterator it=vs.begin();it!=vs.end();it++)
{
cout<<*it<<endl;
}
}
return 0;
}
网友评论