//config = { input: 'tmp', newline: '\r\n' }; // win
config = { input: '/dev/stdin', newline: '\n' }; // linux

buf = require('fs').readFileSync(config.input);

for (tend = 0; buf[tend] >= 0x30; tend++) ;
for (pstart = tend; buf[pstart] < 0x30; pstart++) ;
for (pend = pstart; pend < buf.length && buf[pend] >= 0x30; pend++) ;

P = new Int8Array(pend - pstart);
for (i = 0; i < P.length; i++) P[i] = buf[pstart + i];

(function () {
  var end = tend - P.length + 1;
  var b = buf, p = P, len = P.length;
  for (var i = 0; i < end; i++) {
    for (var j = 0; j < len; j++)
      if (b[i + j] !== p[j]) break;
    if (j === len) console.log(i);
  }
}) ();