include [HTML_REMOVED]
using namespace std;
int main()
{
string str;
while (cin >> str, str != ".")
{
int len = str.size();
//cout<<len<<endl;
for (int n = len; n; n -- )
if (len % n == 0)
{
//cout<<n<<endl;
int m = len / n;
//cout<<m<<endl;
string s = str.substr(0, m);//m算作一个length
//cout<<s<<endl;
string r;
for (int i = 0; i < n; i ++ ) r += s;
//cout<<r<<endl;
if (r == str)
{
cout << n << endl;
break;
}
}
}
return 0;
}
/abababab
8
8
1
a
aaaaaaaa
4
2
ab
abababab
4
/