def szukaj(x):
for i in range (len(wzor)):
if tekst[x+i]!=wzor[i]: return False
return True
tekst=input()
wzor=input()
for i in range (len(tekst)-len(wzor)+1):
if szukaj(i): print(wzor,i)
ZGVmIHN6dWthaih4KToKCWZvciBpIGluIHJhbmdlIChsZW4od3pvcikpOgoJCWlmIHRla3N0W3graV0hPXd6b3JbaV06IHJldHVybiBGYWxzZQoJcmV0dXJuIFRydWUKCnRla3N0PWlucHV0KCkKd3pvcj1pbnB1dCgpCmZvciBpIGluIHJhbmdlIChsZW4odGVrc3QpLWxlbih3em9yKSsxKToKCWlmIHN6dWthaihpKTogcHJpbnQod3pvcixpKQoK