<tbody>
{% load range %}
{% for row in kindergartener_set %}
{% regroup row.size_set by season as season_list %}
{% for season in season_list %}
{% regroup season.list by style as style_list %}
{% for style in style_list %}
{% for size in style.list %}
<tr>
	{% if forloop.parentloop.first %}
	{% if forloop.parentloop.parentloop.first %}
	<td rowspan="{{ row.size_set|length }}">{{ forloop.parentloop.parentloop.parentloop.counter }}</td>
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.modify_date|date:"Y-m-d" }}</td>
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.order_contract.kindergarten.name }}</td>
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.group }}</td>
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.gender }}</td>
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.name }}</td>
	{% endif %}
	<td rowspan="{{ style_list|length }}">{{ season.grouper }}</td>
	{% endif %}
	<td>{{ style.grouper }}</td>
	{% for value in 90|range:"160,10" %}
	{% ifequal value size.checked_size %}
	<td>1</td>
	{% else %}
	<td></td>
	{% endifequal %}
	{% endfor %}
	{% if forloop.parentloop.first %}
	{% if forloop.parentloop.parentloop.first %}
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.height }}</td>
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.weight }}</td>
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.waist }}</td>
	<td rowspan="{{ row.size_set|length }}">{{ row.kindergartener.shoulder }}</td>
	{% endif %}
	{% endif %}
</tr>
{% if forloop.parentloop.last and forloop.parentloop.parentloop.last and forloop.parentloop.parentloop.parentloop.counter|divisibleby:"12" %}
</tbody>
<tbody>
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
</tbody>