In this problem, you need to simulate the simplified calculation of training attributes in the game **Uma Musume Pretty Derby**.
**Note that the rules in this problem are different from the original game.**
Specifically, you will receive the information of an **Uma Musume** and 6 **Support Cards**, as well as several **trainings**, and you need to output the values of each attribute of the **Uma Musume**.
All **Uma Musume** have 6 abilities, which are **speed** $\textstyle speed$, **stamina** $\textstyle sta$, **power** $\textstyle power$, **guts** $\textstyle guts$, **wisdom** $\textstyle wis$, and **skill points** $\textstyle skill$.
An **Uma Musume** has 10 attributes, which are the initial values $\textstyle speed_0,sta_0,power_0,guts_0,wis_0$ of the first 5 abilities and their training bonuses $\textstyle speed_\times,sta_\times,power_\times,guts_\times,wis_\times$.
A **Support Card** has 13 attributes, including the friendship bonus $\textstyle friend$, the motivation effect enhancement $\textstyle drive_+$, the training effect enhancement $\textstyle train$, the initial value bonus of the first 5 attributes $\textstyle speed_0',sta_0',power_0',guts_0',wis_0'$, and the training bonus of the first 5 attributes $\textstyle speed_+,sta_+,power_+,guts_+,wis_+$.
In a single game, you will choose an **Uma Musume** and 6 **Support Cards**. Then, you will let your **Uma Musume** do several **training**.
Each training consists of 6 attributes, including the training camp status $\textstyle summer$, the overweight status $\textstyle weight$, the current motivation $\textstyle drive$, the type of training $\textstyle type$, the level of training $\textstyle lv$, and the set of support cards present (including whether each support card is in a friendship training state) $\textstyle S$. $\textstyle lv$ will not be given directly, but the calculation method is as follows:
- During the training camp, $\textstyle lv$ is fixed at $\textstyle 5$.
- Outside the training camp, $\textstyle lv$ starts at $\textstyle 1$.
- After completing 4 times of the same type of training **outside** the camp, the $\textstyle lv$ of the **specific type** of training will increase by $\textstyle 1$, but not exceeding $\textstyle 5$.
In the following text, $\textstyle \sum_{all}$ represents all carried support cards, $\textstyle \sum_{present}$ represents all support cards present in the current training, and $\textstyle \prod_{friends}$ represents all support cards present in the current training and in a friendship training state.
The initial number of skill points for the **Uma Musume** is $\textstyle 120$, and the initial values of the remaining abilities are $\textstyle \min(1200,X_0+\sum_{all} X_0')$, where $\textstyle X$ represents one among the 6 ability types.
The increase in an **Uma Musume**’s attribute after a training can be calculated according to the following formula, and we will provide a detailed explanation for each item:
$\textstyle \Delta X=\lfloor(base_{lv,type,X}+\sum_{present}X_+)\cdot(\prod_{friends}(1+0.01\cdot friend))\cdot(1+0.01\cdot \sum_{present}train)$
$\textstyle \cdot(1+coef_{drive}\cdot(1+0.01\cdot\sum_{present} drive_+))\cdot(1+0.01\cdot X_\times)\cdot(1+\sum_{present}0.05)\rfloor$
- base training value $\textstyle (base_{lv,type,X}+\sum_{present}X_+)$
The $\textstyle base_{lv,type,X}$ array will be provided in the appendix. Specifically, this represents the base value for the increase of each ability, for each type of training, at each level.
$\textstyle \sum_{present}X_+$ represents the sum of the attribute bonuses of all support cards present, and $\textstyle skill_+$ is always equal to zero.
- Friendship bonus $\textstyle (\prod_{friends}(1+0.01\cdot friend))$
For each **Support Card** with a **friendship training**, we add one to its friendship bonus and then multiply them all together.
- Training effect enhancement $\textstyle (1+0.01\cdot \sum_{present}train)$
We sum up the training bonuses of all **Support Cards** present and add one.
- Motivation bonus $\textstyle (1+coef_{drive}\cdot(1+0.01\cdot\sum_{present} drive_+))$
The motivation ranges from $\textstyle [0,4]$, and $\textstyle coef_i$ are respectively $\textstyle -0.2,-0.1,0,0.1,0.2$.
For each **Support Card** present, we sum up their motivation bonuses and add one, then multiply by the motivation coefficient.
- **Uma Musume** growth rate $\textstyle (1+0.01\cdot X_\times)$
This parameter is only related to the **Uma Musume**’s attributes, and $\textstyle skill_\times$ is always equal to zero.
- Number of support cards present $\textstyle (1+\sum_{present}0.05)$
Each present **Support Card** will provide a $\textstyle 0.05$ bonus.
- Other rules
In particular, if $\textstyle weight=1$, the $\textstyle \Delta speed$ will be forced to become $\textstyle 0$, i.e. the speed cannot be increased.
After training, if the first 5 abilities exceed $\textstyle 1200$, we will take the minimum of $\textstyle 1200$, note that this rule does not apply to skill points.
You need to print the 6 abilities of the **Uma Musume** after each training.