fn main() { let mut ab = String::new(); std::io::stdin().read_line(&mut ab).ok(); let ab: Vec<&str> = ab.trim().split_whitespace().collect(); let a = ab[0]; let b = ab[1]; if a == b { println!("E"); } else if a == "0" || b == "0" || a == "1" || b == "1" { println!("S"); } else { println!("P"); } }