405257: GYM101858 I Important Equipment
Description
Humanity lives inside $$$3$$$ convex walls. The inner one is Wall Sheena, the second one is Wall Rose and the outer one is Wall Maria.
As a member of Survey Corps you are risk your life for humanity. The next mission is to gather some important equipment.
The Survey Corps have a list of $$$n$$$ equipment. You know the position of every equipment and you need to tell the Survey Corps where are each equipment, inside Wall Sheena, Wall Rose, Wall Maria or outside.
A position in the border of a wall is considered inside the wall.
![](https://espresso.codeforces.com/7b7d15e0baec02c84f1a9ced9128a3b8b05d7c95.png)
The first line of input contains three integers, $$$s$$$, $$$r$$$ and $$$m$$$ ($$$3 \le s, r, m \le 1000$$$) — the number of points that define Wall Sheena, Wall Rose and Wall Maria, respectively.
The next $$$s$$$ lines contains, each, two integers, $$$x_i$$$ and $$$y_i$$$ ($$$-10^6 \le x_i, y_i \le 10^6$$$) — the points that define Wall Sheena, in counter-clockwise order. No three points are collinear.
The next $$$r$$$ lines contains, each, two integers, $$$x_i$$$ and $$$y_i$$$ ($$$-10^6 \le x_i, y_i \le 10^6$$$) — the points that define Wall Rose, in counter-clockwise order. No three points are collinear.
The next $$$m$$$ lines contains, each, two integers, $$$x_i$$$ and $$$y_i$$$ ($$$-10^6 \le x_i, y_i \le 10^6$$$) — the points that define Wall Maria, in counter-clockwise order. No three points are collinear.
The next line contains one integer, $$$n$$$ ($$$1 \le n \le 1000$$$) — the number of important equipment.
The next $$$n$$$ lines contains, each, two integers, $$$x_i$$$ and $$$y_i$$$ ($$$-10^6 \le x_i, y_i \le 10^6$$$) — the position of $$$i$$$-th equipment.
It's guaranteed that all walls are convex, that Wall Sheena is strictly inside Wall Rose and that Wall Rose is strictly inside Wall Maria.
OutputFor each equipment, print "Sheena", "Rose", "Maria" or "Outside", meaning that the equipment is inside the wall printed and not inside any inner one, or outside of all walls.
ExamplesInput4 4 4Output
-1 -1
1 -1
1 1
-1 1
-2 -2
2 -2
2 2
-2 2
-3 -3
3 -3
3 3
-3 3
5
0 0
1 0
2 0
3 0
4 0
SheenaInput
Sheena
Rose
Maria
Outside
4 5 5Output
2 4
2 3
4 2
4 4
5 1
5 5
2 5
1 3
4 1
0 0
7 0
5 6
1 6
0 5
7
2 7
1 1
6 4
3 1
3 3
0 1
3 2
OutsideNote
Maria
Outside
Maria
Sheena
Maria
Rose
Image on statement represents test case #2.