You are a student of the Academy for Covert Missions, currently #cf_span(class=[tex-font-style-underline], body=[not]) doing your chemistry homework. Now, chemistry can be useful to secret agents in many ways – gunpowder, smoke bombs, poison – but you don't care about any of that. You want to be a Hacker Agent, the enigmatic guy in the hoodie watching various UI elements pop up on the screen, the guy spewing technical terms while rapidly hacking on the back of a speeding motorcycle. That's why you're going to make a computer program to do your homework for you!
An atom has one or more electron shells, and each shell itself has one or more subshells. The electrons of an atom are distributed across its different shells within the different subshells. The Aufbau Principle dictates how these electrons are distributed, which is called its electron configuration.
An example electron configuration is that of Oxygen (O), which is $1 s^2$ $2 s^2$ $2 p^4$. This means:
As in the example, the electron configuration of an element is represented by a series of terms of the form $n l^e$, where:
The corresponding letters/labels for each subshell are:
$$\begin{array}{|r|rrrr|} \hline \ell & 0 & 1 & 2 & 3 \\ \hline l & s & p & d & f \\ \hline \end{array}$$
Each shell of an atom has a maximum number of subshells – in fact, the $n$th shell can have up to $n$ subshells (thus, $0 <= ell < n$, always).
Each subshell of an atom has a maximum "_capacity_" – in other words, it can only fit a specific number of electrons. This capacity is determined solely by its $l$, in particular: $2 (2 ell + 1)$. Thus, the $3 p$ subshell can fit $2 (2 dot.op 1 + 1) = 6$ electrons, the $2 p$ subshell can also fit $6$ electrons, while the $4 d$ subshell can fit $2 (2 dot.op 2 + 1) = 10$ electrons.
The Aufbau Principle states that the electrons of an atom fill up subshells (to their capacity) in order of increasing $n + ell$, and in ties, by increasing $n$, as illustrated in this diagram:
For example, Hydrogen, with 1 electron, fills the zeroth subshell in the first shell with its lone electron. Thus, its electron configuration is $1 s^1$. Helium, with 2 electrons, will fill the zeroth subshell with both of its electrons, making its configuration $1 s^2$. Lithium, with 3 electrons, will fill up the zeroth subshell in the first shell, then fill the first subshell in the second shell, making it $1 s^2$ $2 s^1$. Potassium, the 19th element and thus 19 electrons, will have the following configuration: $1 s^2$ $2 s^2$ $2 p^6$ $3 s^2$ $3 p^6$ $4 s^1$.
Seeing this pattern, you figure out that you could make a simple program for this. You can even generalize it to the $10^(15)$th element! You hope that there are no exceptions to the Aufbau Principle. (Spoiler: there are, but you don't really care enough about chemistry to address them.) Also, for $ell > 3$, you're not really sure what happens, but you are just going to assume that the rest of the alphabet after 'f' (excluding 's' and 'p') will be used. That is, we will use the following extended table of levels: $$ \begin{array}{|r|rrrrrrrrrr} \hline \ell & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & \ldots \\ \hline l & s & p & d & f & g & h & i & j & k & \ldots \\ \hline \end{array}$$ Remember that 's' and 'p' are skipped.
Once you reach 'z', you will use two-letter labels without skipping any letters this time. Specifically, you will use all possible two-letter combinations in lexicographical order (aa, ab, ac, ..., az, ba, bb, ..., ca, ..., zz).
After 'zz', all three-letter combinations (aaa, aab, ..., zzz) will be used as labels, and so on.
You therefore "extend" the pattern as follows:
Now, given an atomic number (which is the same as its number of electrons), can you find the last electron shell, last subshell and number of electrons in the last shell in its electron configuration? In other words, what is the last "$n l^e$"? For example, if the given atomic number is $19$, then the answer should be $4 s^1$.
Output the answer as $n$, $l$, $e$ in a single line NOT separated by spaces. For example, for $19$, output _4s1_.
The first line of input contains $t$, the number of test cases. $t$ test cases follow.
Each test case is composed of a single line containing an integer $a$ denoting an atomic number.
*Constraints*
$1 <= t <= 10^5$
$1 <= a <= 10^(15)$
For each test case, output a single line containing $n$, $l$ and $e$, NOT separated by spaces. For example, for $19$, output _4s1_.
## Input
The first line of input contains $t$, the number of test cases. $t$ test cases follow.Each test case is composed of a single line containing an integer $a$ denoting an atomic number.*Constraints*$1 <= t <= 10^5$$1 <= a <= 10^(15)$
## Output
For each test case, output a single line containing $n$, $l$ and $e$, NOT separated by spaces. For example, for $19$, output _4s1_.
[samples]
**Definitions**
Let $ t_1, t_2, t_3 \in \mathbb{R} $ be the nominal temperatures of the cold, neutral, and hot dispensers.
Let $ m_i = \frac{m_i^{(n)}}{m_i^{(d)}} \in [0,1] $ for $ i \in \{1,2,3\} $ be the probability that dispenser $ i $ malfunctions.
Let $ d_{i,j} = \frac{d_{i,j}^{(n)}}{d_{i,j}^{(d)}} \in [0,1] $ be the conditional probability that, given dispenser $ i $ malfunctions, it outputs temperature $ t_j $.
Let $ l, u \in \mathbb{R} $ be the lower and upper bounds of the acceptable temperature range.
Let $ v_1, v_2, v_3 \in \mathbb{R}_{\geq 0} $ be the volumes (in mL) of water drawn from dispensers 1, 2, 3 respectively, such that $ v_1 + v_2 + v_3 = 1000 $.
**Given/Constraints**
1. $ v_1 + v_2 + v_3 = 1000 $, $ v_i \geq 0 $ for all $ i $.
2. At most one dispenser malfunctions; the malfunction events are mutually exclusive.
3. For each dispenser $ i $, the conditional probabilities satisfy:
$$
\sum_{j=1}^3 d_{i,j} = 1 \quad \text{for all } i \in \{1,2,3\}.
$$
4. The malfunction probabilities satisfy:
$$
0 \leq m_i \leq 1 \quad \text{for all } i \in \{1,2,3\}.
$$
**Objective**
Maximize the probability $ P $ that the final drink temperature $ T $ satisfies $ l \leq T \leq u $, over all choices of $ (v_1, v_2, v_3) $.
The temperature $ T $ is a random variable determined by:
- With probability $ (1 - m_1)(1 - m_2)(1 - m_3) $: no malfunction, $ T = \frac{v_1 t_1 + v_2 t_2 + v_3 t_3}{1000} $.
- With probability $ m_i \cdot d_{i,j} $: dispenser $ i $ malfunctions and outputs $ t_j $, so:
$$
T = \frac{v_1 \cdot (\text{actual output of disp }1) + v_2 \cdot (\text{actual output of disp }2) + v_3 \cdot (\text{actual output of disp }3)}{1000}
$$
where the output of dispenser $ i $ is $ t_j $, and others are nominal.
Thus, the total probability is:
$$
P = \sum_{\text{all scenarios}} \Pr(\text{scenario}) \cdot \mathbf{1}\left[l \leq \frac{\sum_{k=1}^3 v_k \cdot T_k^{\text{actual}}}{1000} \leq u\right]
$$
where $ T_k^{\text{actual}} $ is the actual temperature output by dispenser $ k $ under the scenario.
**Output**
The maximum value of $ P $, expressed as a reduced fraction $ \frac{x}{y} $ with $ y > 0 $.