C. Codemas Carols
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Alice, Bob, and Cindy are going caroling! Wouldn't it be cute if they had a special song for each Department of their school? Tonight, they're going to visit the Computer Science Dept. Let's write them a cute song!

The song, "The $$$n$$$ Days of Codemas," has $$$n$$$ verses labeled in order from $$$1$$$ to $$$n$$$, and each verse follows a specific pattern.

You can check the first Sample Output for what the song looks like with $$$n=6$$$ verses, but let's look at how to construct such a song in general. Each verse consists of some number of lines.

For each $$$k$$$ from $$$1$$$ to $$$n$$$, the $$$k$$$th verse looks as follows:

  • Its first line is:
    On the <kth> day of Codemas, my computer gave to me,
  • The next $$$k-1$$$ lines are:
    <x> compiler warnings,
    where $$$x$$$ counts down from $$$k$$$ to $$$2$$$; as an exception, for $$$x = 5$$$, it is instead:
    FIVE! COMPILER! WARNINGS!!!
  • On all verses except the first, the last line is:
    And a syntax error on line three!
    On the first verse only, omit that And, so the last line is just:
    A syntax error on line three!

In the first line, <kth> should format the verse number $$$k$$$ in its ordinal form. For this problem, use the following formatting rules:

  • If the last digit is $$$1$$$, the suffix is st
  • If the last digit is $$$2$$$, the suffix is nd
  • If the last digit is $$$3$$$, the suffix is rd
  • Otherwise, the suffix is th
  • As a special exception, if the last two digits are $$$11$$$, $$$12$$$, or $$$13$$$, then the suffix is th

You have to answer $$$Q$$$ questions of the following form: Given a positive integer $$$i$$$, what is the $$$i$$$th line in the song? Or, say that the song has already ended.

Input

The first line of input contains two space-separated integers $$$n$$$ and $$$Q$$$.

$$$Q$$$ lines follow, each containing some integer $$$i$$$, corresponding to the $$$Q$$$ questions that must be answered.

Contestants are recommended to use fast methods of input and output for this problem. It is recommended that Python users submit to PyPy for this problem.

$$$$$$\begin{align*}

&\begin{array}{|l|} \hline \text{Constraints For All Subtasks} \\ \hline 1 \leq Q \leq 10^5 \\ 1 \leq n \leq 10^9 \\ 1 \leq i \leq 10^{18} \\ \hline \end{array}\\

&\begin{array}{|c|c|l|} \hline \text{Subtask} & \text{Points} & \text{Constraints} \\ \hline

1 & \mathbf{12} & i \leq 15 \\ \hline

2 & \mathbf{40} & i \leq 10^5 \\ \hline

3 & \mathbf{12} & Q \le 5 \\ && i \le 10^{12} \\ \hline

4 & \mathbf{12} & i \le 10^{12} \\ \hline

5 & \mathbf{12} & Q \le 5 \\ \hline

6 & \mathbf{12} & \text{No further constraints.} \\ \hline

\end{array}\\

\end{align*}$$$$$$

Output

Output $$$Q$$$ lines, answering each of the questions in order. If for some question, there is no $$$i$$$th line in the song, then output Codemas is already over! instead.

The checker is strict. Do not even output extra spaces or newlines.

Examples
Input
6 30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Output
On the 1st day of Codemas, my computer gave to me,
A syntax error on line three!
On the 2nd day of Codemas, my computer gave to me,
2 compiler warnings,
And a syntax error on line three!
On the 3rd day of Codemas, my computer gave to me,
3 compiler warnings,
2 compiler warnings,
And a syntax error on line three!
On the 4th day of Codemas, my computer gave to me,
4 compiler warnings,
3 compiler warnings,
2 compiler warnings,
And a syntax error on line three!
On the 5th day of Codemas, my computer gave to me,
FIVE! COMPILER! WARNINGS!!!
4 compiler warnings,
3 compiler warnings,
2 compiler warnings,
And a syntax error on line three!
On the 6th day of Codemas, my computer gave to me,
6 compiler warnings,
FIVE! COMPILER! WARNINGS!!!
4 compiler warnings,
3 compiler warnings,
2 compiler warnings,
And a syntax error on line three!
Codemas is already over!
Codemas is already over!
Codemas is already over!
Input
2023 8
1
2
561
4000
4004
6216
24753
1000000
Output
On the 1st day of Codemas, my computer gave to me,
A syntax error on line three!
On the 33rd day of Codemas, my computer gave to me,
FIVE! COMPILER! WARNINGS!!!
And a syntax error on line three!
On the 111th day of Codemas, my computer gave to me,
On the 222nd day of Codemas, my computer gave to me,
405 compiler warnings,