AtCoder currently hosts three types of contests, ABC, ARC, and AGC. As the number of users has grown, in order to meet the needs of more users, AtCoder has decided to increase the number of contests to 26 types, from AAC to AZC. For convenience, we number these 26 types as type 1 through type 26. AtCoder wants to schedule contests for $D$ days so that user satisfaction is as high as possible. For every day, AtCoder will hold exactly one contest, and each contest will end on that day. The satisfaction is calculated as follows.
* The satisfaction at the beginning of day 1 is 0. Satisfaction can be negative.
* Holding contests increases satisfaction. The amount of increase will vary depending on a variety of factors. Specifically, we know in advance that holding a contest of type $i$ on day $d$ will increase the satisfaction by $s_{d,i}$.
* If a particular type of contest is not held for a while, the satisfaction decreases. Each contest type $i$ has an integer $c_i$, and at the end of each day $d=1,2,...,D$, the satisfaction decreases as follows. Let $\mathrm{last}(d,i)$ be the last day before day $d$ (including $d$) on which a contest of type $i$ was held. If contests of type $i$ have never been held yet, we define $\mathrm{last}(d,i)=0$. At the end of day $d$, the satisfaction decreases by $\sum _{i=1}^{26}c_i \times (d-\mathrm{last}(d,i))$.
Please schedule contests on behalf of AtCoder. If the satisfaction at the end of day $D$ is $S$, you will get a score of $\max(10^6 + S, 0)$. There are 50 test cases, and the score of a submission is the total scores for each test case. You can make submissions multiple times, and the highest score among your submissions will be your score.
## Constraints
* $D = 365$
* Each $c_i$ is an integer satisfying $0\leq c_i \leq 100$.
* Each $s_{d,i}$ is an integer satisfying $0\leq s_{d,i} \leq 20000$.
## Input
Input is given from Standard Input in the following format:
$D$
$c_1$ $c_2$ $\cdots$ $c_{26}$
$s_{1,1}$ $s_{1,2}$ $\cdots$ $s_{1,26}$
$\vdots$
$s_{D,1}$ $s_{D,2}$ $\cdots$ $s_{D,26}$
## Beginner's Guide
If you don't know what to do, proceed to problem B or C.
## Tools (input Generator And Visualizer)
**(2025/10/7) We have prepared a new set of tools in the same format as those used in the AtCoder Heuristic Contest.**
* [Web version](https://img.atcoder.jp/intro-heuristics/vis.html?lang=en): This is more powerful than the local version providing animations and manual play.
* [Local version](https://img.atcoder.jp/intro-heuristics/tools.zip): You need a compilation environment of [Rust language](https://www.rust-lang.org/).
* [Pre-compiled binary for Windows](https://img.atcoder.jp/intro-heuristics/tools_windows.zip): If you are not familiar with the Rust language environment, please use this instead.
The sample output for holding a contest of type $((d - 1) \% 26) + 1$ on day $d$ $(1 \le d \le D)$ can be found [here](https://img.atcoder.jp/intro-heuristics/vis.html?lang=en&output=sample).
[samples]