S = gets.split('')
T = gets.split('')
array = Array.new(S - T + 1)

(1..S - T + 1).each do |i|
  sum = 0
  (i - 1..i + T - 1).each do |j|
    if S[j] == T[j]
      sum += 1
    end
  end
  array << sum
end

puts array
