In this problem your task is to come up with a week schedule of classes in university for professors and student groups. Consider that there are 6 educational days in week and maximum number of classes per educational day is 7 (classes numerated from 1 to 7 for each educational day).
It is known that in university _n_ students study, _m_ professors work and there are _a_ classrooms for conducting classes. Also you have two-dimensional array with _n_ × _m_ size which contains the following information. The number which stays in _i_\-th row and _j_\-th column equals to the number of classes which professor _j_ must conduct with the group _i_ in a single week. The schedule which you output must satisfy to array described above.
There are several other conditions for schedule. Single professor can not conduct more than one class. Similarly, single student group can not be on more than one class at the same time.
Let define a _fatigue_ function for professors and student groups. Call this function _f_.
To single professor _fatigue_ calculated in the following way. Let look on classes which this professor must conduct in each of the 6\-th educational days. Let _x_ be the number of class which professor will firstly conduct in day _i_ and let _y_ — the last class for this professor. Then the value (2 + _y_ - _x_ + 1)·(2 + _y_ - _x_ + 1) must be added to professor's _fatigue_. If professor has no classes in day _i_, nothing is added to professor's _fatigue_.
For single student group _fatigue_ is calculated similarly. Lets look at classes of this group in each of the 6 educational days. Let _x_ be the number of first class for this group on day _i_ and let _y_ — the last class for this group. Then the value (2 + _y_ - _x_ + 1)·(2 + _y_ - _x_ + 1) must be added to this group's _fatigue_. If student group has no classes in day _i_, nothing is added to group's _fatigue_.
So the value of function _f_ equals to total {fatigue} for all _n_ student groups and for all _m_ professors.
Your task is to come up with such a schedule which minimizes the value of function _f_.
Jury prepared some solution of this problem. For each test you will get a certain number of points. It equals to result of division of the value of function _f_ from the jury solution by the value of function _f_ for schedule which your program output (i. e. the smaller value of {fatigue} function your program find the more points you will get), multiplied by 100. In the other words if the value of _f_ for jury solution equals to _p_ and for your solution — to _q_, you will get 100·_p_ / _q_ points (note, that the number of points is a real number). The points will be added together for all tests. The goal is to score as many points as possible.
## Input
The first line contains three integers _n_, _m_ and _a_ (1 ≤ _n_, _m_, _a_ ≤ 60) — the number of groups, the number of professors and the number of classrooms.
Each of the following _n_ lines contains _m_ integers from 0 to 24 — _j_\-th number in _i_\-th line equals to the number of classes with the professor _j_ must conduct with the _i_\-th student group.
It is guaranteed that the number of classes in week for each professor and for each student group does not exceed 24. Also guaranteed that the total number of classes in week does not exceed 75% from a maximum number of classes which can be conducted based on the number of classrooms. For all tests there is at least one schedule satisfying all described conditions.
## Output
In the first line print the minimized value of function _f_.
After that print blank line.
After that print the schedule for each student group in increasing order of group number. For each student group print 7 lines. Each line must contains 6 numbers. Let the number at _i_\-th line and _j_\-th column equals to _x_. If in _j_\-th day current group has no class number _i_, _x_ must be equals to zero. Otherwise _x_ must be equals to the number of professor who will conduct the corresponding class with the corresponding student group.
The number of classes which will be conducted simultaneously must not exceeds the number of classrooms _a_.
Separate the description of the schedules for groups with a blank line.
[samples]
## Note
During the main part of the competition (one week) you solution will be judged on 100 preliminary tests. The first 10 preliminary tests are available for download by a link [http://assets.codeforces.com/files/vk/vkcup-2017-wr2-materials-v1.tar.gz](//assets.codeforces.com/files/vk/vkcup-2017-wr2-materials-v1.tar.gz).
After the end of the contest (i.e., a week after its start) the last solution you sent (having positive score) will be chosen to be launched on the extended final tests.
**Definitions**
Let $ n, m, a \in \mathbb{Z}^+ $ denote the number of student groups, professors, and classrooms, respectively.
Let $ C \in \mathbb{Z}^{n \times m} $ be the demand matrix, where $ C_{i,j} $ is the number of classes professor $ j $ must teach with group $ i $ per week.
Let $ D = 6 $ be the number of educational days per week.
Let $ L = 7 $ be the maximum number of class slots per day (numbered 1 to 7).
A schedule is a mapping $ S: \{1, \dots, n\} \times \{1, \dots, D\} \times \{1, \dots, L\} \to \{0\} \cup \{1, \dots, m\} $, where $ S_{i,d,k} = j $ means group $ i $ has a class with professor $ j $ on day $ d $ at slot $ k $, and $ S_{i,d,k} = 0 $ means no class.
**Constraints**
1. **Demand satisfaction**: For each group $ i $ and professor $ j $,
$$
\sum_{d=1}^D \sum_{k=1}^L \mathbf{1}_{S_{i,d,k} = j} = C_{i,j}
$$
2. **Professor uniqueness**: For each professor $ j $, day $ d $, and slot $ k $, at most one group is assigned:
$$
\left| \left\{ i \in \{1,\dots,n\} \mid S_{i,d,k} = j \right\} \right| \leq 1
$$
3. **Group uniqueness**: For each group $ i $, day $ d $, and slot $ k $, at most one professor is assigned:
$$
\left| \left\{ j \in \{1,\dots,m\} \mid S_{i,d,k} = j \right\} \right| \leq 1
$$
4. **Classroom capacity**: For each day $ d $ and slot $ k $, the number of concurrent classes does not exceed $ a $:
$$
\sum_{i=1}^n \mathbf{1}_{S_{i,d,k} \neq 0} \leq a
$$
5. **No overlapping assignments**: For each $ (i,d) $, the non-zero $ S_{i,d,k} $ form a contiguous interval (no gaps).
**Fatigue Function**
For each professor $ j $, define for each day $ d $:
- Let $ x_{j,d} = \min \{ k \in \{1,\dots,L\} \mid \exists i, S_{i,d,k} = j \} $ if professor $ j $ has classes on day $ d $, else undefined.
- Let $ y_{j,d} = \max \{ k \in \{1,\dots,L\} \mid \exists i, S_{i,d,k} = j \} $ if professor $ j $ has classes on day $ d $, else undefined.
- If professor $ j $ has no class on day $ d $, contribution is 0.
- Otherwise, fatigue contribution: $ (2 + y_{j,d} - x_{j,d} + 1)^2 = (y_{j,d} - x_{j,d} + 3)^2 $.
Similarly for each group $ i $:
- Let $ x_{i,d} = \min \{ k \in \{1,\dots,L\} \mid S_{i,d,k} \neq 0 \} $ if group $ i $ has classes on day $ d $, else undefined.
- Let $ y_{i,d} = \max \{ k \in \{1,\dots,L\} \mid S_{i,d,k} \neq 0 \} $ if group $ i $ has classes on day $ d $, else undefined.
- Fatigue contribution: $ (y_{i,d} - x_{i,d} + 3)^2 $ if classes exist, else 0.
Total fatigue:
$$
f = \sum_{j=1}^m \sum_{d=1}^D (y_{j,d} - x_{j,d} + 3)^2 \cdot \mathbf{1}_{\text{prof } j \text{ has class on day } d} + \sum_{i=1}^n \sum_{d=1}^D (y_{i,d} - x_{i,d} + 3)^2 \cdot \mathbf{1}_{\text{group } i \text{ has class on day } d}
$$
**Objective**
Minimize $ f $ subject to the above constraints.