我好菜啊
//话说这题标签好像错了
#include <bits/stdc++.h>
using namespace std;
int main()
{
int len, ans;
string str;
while (cin >> str && str != ".") {
len = str.length();
int i = 0, j = len - 1;
ans = 0;
for (; i < len / 2; ++i, --j) {
if (str.substr(0, i + 1) == str.substr(j, i + 1)) {
ans = len / (i + 1);
string buff ="";
for (int k = 0; k < ans; ++k) buff += str.substr(0, i + 1);
if (buff == str)
break;
else ans = 0;
}
}
if (ans != 0) cout << ans << endl;
else cout << 1 << endl;
}
return 0;
}