#include <iostream>
#include <string>
using namespace std;
int main ()
{
string a;
while (cin >> a)
{
int k;
k = a.size();
cout << a << endl;
for (int r = 0 ; r < k-1 ; r++)
{
for (int i = 0 ; i < k-1 ; i++)
swap(a[i], a[i+1]);
cout << a << endl;
}
}
return 0;
}
外圈迴圈是重複次數
內圈迴圈是把最前面的元素換到最後面