#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, [ $t:tt ]) => {
        {
            let len = read_value!($next, usize);
            (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        }
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        s: chars,
    }
    let mut v = vec![(0, 0); s.len()];
    for i in 0..s.len() {
        v[i].0 = {
            if s[i] == 'L' {
                0
            } else {
                let mut count = 0;
                for j in i + 1..s.len() {
                    if s[j] == 'L' {
                        count += 1;
                    } else {
                        break;
                    }
                }
                count
            }
        };
        v[i].1 = {
            if s[i] == 'R' {
                0
            } else {
                let mut count = 0;
                for j in (0..i).rev() {
                    if s[j] == 'R' {
                        count += 1;
                    } else {
                        break;
                    }
                }
                count
            }
        };
    }
    let ans = (0..s.len())
        .map(|i| {
            v[i].0 / 2
                + v[i].1 / 2
                + if i != 0 && s[i - 1] == 'R' {
                    (v[i - 1].0 + v[i - 1].1 + 1) / 2
                } else {
                    0
                }
                + if i != s.len() - 1 && s[i + 1] == 'L' {
                    (v[i + 1].0 + v[i + 1].1 + 1) / 2
                } else {
                    0
                }
        })
        .map(|x| x.to_string())
        .collect::<Vec<_>>()
        .join(" ");
    println!("{}", ans);
}


Measured memory_bytes: 10492