Id and Ship Problem Code: FLOW010 (CodeChef)

Write a program that takes in a letterclass ID of a ship and display the equivalent string class description of the given ID. Use the table below.

Class IDShip Class
B or bBattleShip
C or cCruiser
D or dDestroyer
F or fFrigate

Input

The first line contains an integer T, the total number of testcases. Then T lines follow, each line contains a character.

Output

For each test case, display the Ship Class depending on ID, in a new line.

Constraints

  •  T  1000

Example

Input

3 
B
c
D

Output
BattleShip
Cruiser
Destroyer
Solution:
t=int(input())
Id = {'B':"BattleShip","C":"Cruiser","D":"Destroyer","F":"Frigate",'b':"BattleShip","c":"Cruiser","d":"Destroyer","f":"Frigate"}
for i in range (t):
    k=input()
    print(Id[k])

Comments

Popular posts from this blog

Chef and Remissness Problem Code: REMISS (CodeChef)

Sort in specific order (GFG)

Reverse words in a given string (GFG)