fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let n: Vec<_> = s.split_whitespace().collect(); println!( "{}", match (n[0], n[1]) { ("0", "0") | ("2", "2") => 'E', (_, "0") | ("0", _) | (_, "1") | ("1", _) => 'S', _ => 'P', } ) }