Train Reservation

2.7

21 votes
Medium-Hard
Problem

Semester examinations are over at JEC and Shikhar is eagerly waiting for going to home. He calls the travel agent to get his reservation done. The agent tells him about the vacant berths which could be reserved. As most of us do, Shikhar also likes the Side Lower berths. Now, Shikhar has the list of empty berth numbers but he doesn't know which of them is Side Lower. Make a program to output the type of berth when the berth number is given as input.

Assume it to be a Sleeper Class Compartment with a total of 72 berths. Let first input to be the number of test cases N.

0<N<10

The output should be out of the below options only:

  • Upper
  • Lower
  • Middle
  • Side Upper
  • Side Lower

Input

5
2
11
7
23
6

Output

Middle
Upper
Side Lower
Side Lower
Upper
Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?