#K53277. Categorize Prices
Categorize Prices
Categorize Prices
You are given a list of prices for a series of items. For each price, you must determine the appropriate category according to the following rules:
- If the price is strictly less than \(20\), it is categorized as CHEAP.
- If the price is at least \(20\) but strictly less than \(50\), it is categorized as AFFORDABLE.
- If the price is \(50\) or more, it is categorized as EXPENSIVE.
The input is provided via standard input (stdin) where the first line contains an integer \(T\) representing the number of prices. The second line contains \(T\) integers separated by spaces, each representing a price value. Your program should output each corresponding category on a separate line, in the same order as the input.
inputFormat
The first line of input contains a single integer \(T\) indicating the number of prices. The second line contains \(T\) space-separated integers representing the prices.
outputFormat
Output \(T\) lines, each containing the category for the corresponding price (i.e. CHEAP, AFFORDABLE, or EXPENSIVE). Ensure that each result is printed on its own line.
## sample3
15 45 60
CHEAP
AFFORDABLE
EXPENSIVE
</p>