Under construction

Still being built. Things may change

Naming Wine Bottles

Time limit2sMemory limit1024 MB

Summary
Give each bottle volume a lowercase Latin name, using the same name for equal volumes that have up to 10 decimal digits in liters.
Level

Easy3 of 10

Topics
Hash map, String, Implementation
Solved
No attempts yet

Problem

Wine is a sophisticated business. Bottling alone encompasses the art of label design, the physics of vacuum sealing, the craft of glassforming, and the calculus of volumetric shapes.

Today we will deal with literature: every size of wine bottle has a name. You may know that a "Standard" bottle holds 0.75L. Did you also know that a 15L bottle is a "Nebuchadnezzar", and a 12L is a mighty "Balthazar"?

Usually wine bottle sizes come in multiples of 1.5L. You have some other bottles in non-standard sizes and you will need to create impressive names for them as well. Note that any two bottles of the same size must have consistent names.

Input

On the first line, the number of bottles nn (1≤n≤10 0001 \le n \le 10\,000). On each of the following nn lines, the volume of a bottle viv_i (0.0≤vi≤1040.0 \le v_i \le 10^4) with up to 1010 digits after the decimal point, followed by an uppercase letter "L".

Output

For each given line, output one lower-case word, with Latin letters only, giving a name for this size of bottle.

Examples2

  1. Example 1

    Input
    6
    15L
    0.88L
    1.0L
    1L
    1000L
    1024L
    
    Expected output
    nebuchadnezzar
    hammurabi
    standard
    standard
    giganebriator
    gibinebriator
    
  2. Example 2

    Input
    3
    0.03L
    0.031L
    0.03L
    
    Expected output
    small
    smallish
    small