a,b = gets.split.map(&:to_i) if a==0 && b==0 puts "E" elsif a==0 || b==0 puts "S" elsif 3<=a && 3<=b puts "P" elsif a==2 && b==2 puts "E" else puts "S" end