s = gets.chomp
len = s.length
ans = []
cnt = 0
num = 0
if s[0] == "<"
  ans << num
else
  cnt += 1
end
(len-1).times do |i|
  if s[i] == "<" && s[i+1] == "<"
    num += 1
    ans << num
  elsif s[i] == "<" && s[i+1] == ">"
    num += 1
  elsif s[i] == ">" && s[i+1] == "<"
    cnt += 1
    cnt.times do |j|
      if j == 0 && num > cnt-j
        ans << num
      else
        ans << cnt-j
      end
    end
    cnt = 0
    num = 0
    ans << num
  elsif s[i] == ">" && s[i+1] == ">"
    cnt += 1
  end
end
if s[-1] == ">"
  cnt.times do |j|
    if j == 0 && num > cnt-j
      ans << num
    else
      ans << cnt-j
    end
  end
  ans << 0
else
  num += 1
  cnt += 1
  cnt.times do |j|
    if j == 0 && num > cnt-j
      ans << num
    else
      ans << cnt-j
    end
  end
end
puts ans.inject(:+)