#include <string.h>
#include <algorithm>
#include <stdio.h>
using namespace std;
typedef long long ll;
const int MAXN = 4e5 + 5, BASE = 26;
const ll MOD = 1000000007LL;
char str[MAXN];
ll powers[MAXN];
int main(){
powers[0] = 1;
for(int i=1; i<MAXN-1; ++i) powers[i] = (powers[i - 1] * BASE) % MOD;
while(scanf("%s", str) != EOF){
int N = strlen(str);
ll pre = 0, suf = 0;
int i = 0, j = N - 1;
while(i <= N - 1 && j >= 0){
pre = (pre + (1LL * (str[i] - 'a' + 1) * powers[i]) % MOD) % MOD;
suf = ((suf * BASE) % MOD + 1LL * (str[j] - 'a' + 1)) % MOD;
if(pre == suf) printf("%d ", i + 1);
i++, j--;
}
puts("");
}
return 0;
}
I2luY2x1ZGUgPHN0cmluZy5oPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8c3RkaW8uaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKCmNvbnN0IGludCBNQVhOID0gNGU1ICsgNSwgQkFTRSA9IDI2Owpjb25zdCBsbCBNT0QgPSAxMDAwMDAwMDA3TEw7CgpjaGFyIHN0cltNQVhOXTsKbGwgcG93ZXJzW01BWE5dOwoKaW50IG1haW4oKXsKICBwb3dlcnNbMF0gPSAxOwogIGZvcihpbnQgaT0xOyBpPE1BWE4tMTsgKytpKSBwb3dlcnNbaV0gPSAocG93ZXJzW2kgLSAxXSAqIEJBU0UpICUgTU9EOwogIHdoaWxlKHNjYW5mKCIlcyIsIHN0cikgIT0gRU9GKXsKICAgIGludCBOID0gc3RybGVuKHN0cik7CiAgICBsbCBwcmUgPSAwLCBzdWYgPSAwOwogICAgaW50IGkgPSAwLCBqID0gTiAtIDE7CiAgICB3aGlsZShpIDw9IE4gLSAxICYmIGogPj0gMCl7CiAgICAgIHByZSA9IChwcmUgKyAoMUxMICogKHN0cltpXSAtICdhJyArIDEpICogcG93ZXJzW2ldKSAlIE1PRCkgJSBNT0Q7CiAgICAgIHN1ZiA9ICgoc3VmICogQkFTRSkgJSBNT0QgKyAxTEwgKiAoc3RyW2pdIC0gJ2EnICsgMSkpICUgTU9EOwogICAgICBpZihwcmUgPT0gc3VmKSBwcmludGYoIiVkICIsIGkgKyAxKTsKICAgICAgaSsrLCBqLS07CiAgICB9CiAgICBwdXRzKCIiKTsKICB9CiAgcmV0dXJuIDA7Cn0=