Mimi is ordering pizza! She looks at the menu and sees the following options:
Name | Price | Vegetarian |
---|---|---|
C | $2 | No |
D | $2 | Yes |
A | $5 | No |
B | $5 | Yes |
Mimi's favourite pizza is type A, her next favourite is type B, then type C, and then type D. She also notes that you can only order 1 type of pizza.
Given her budget in dollars, NO PIZZA
if she cannot buy
Constraints
Input Specification
The first line of input will contain a single integer,
The next line of input will contain a single integer,
The next line of input will contain either Y
if her vegetarian friends are coming, or N
otherwise.
Output Specification
The most preferred pizza she can buy, or NO PIZZA
if she cannot buy any pizza.
Sample Input
Copy
6
2
Y
Sample Output
Copy
D
Comments
Remember to output "NO PIZZA" if she can't buy pizza.