use std::io;

fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {
    if x.len() > y.len() { x } else { y }    
}

fn brap<'b>(x: &'b str, y: &str) -> &'b str {
    if x.len() > y.len() { x } else { "henkieeeeee" }
}

fn main() {
    let stronk = String::from("stronkman");

    let ln;
    {
        let stonks = "stonks";
        let mut inp = String::new();
        io::stdin().read_line(&mut inp).expect("Please input a name");
        ln = longest(&inp, brap(stronk.as_str(), stonks));
    }
    println!("The longest of them all: {}", ln);
}
