print((function (s) if #s == 3 then if s == "0 0" or s == "2 2" then return "E" end local a, b = s:sub(1,1), s:sub(3,3) if a == "0" or a == "1" or b == "0" or b == "1" then return "S" end end return "P" end)(io.stdin:read("*l")))