Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		n, _ := strconv.Atoi(scanner.Text())
		if n == 0 {
			break
		}
		ans := make([]int, 7)
		for i := 0; i < n; i++ {
			scanner.Scan()
			a, _ := strconv.Atoi(scanner.Text())
			switch {
			case a < 10:
				ans[0]++
			case 10 <= a && a < 20:
				ans[1]++
			case 20 <= a && a < 30:
				ans[2]++
			case 30 <= a && a < 40:
				ans[3]++
			case 40 <= a && a < 50:
				ans[4]++
			case 50 <= a && a < 60:
				ans[5]++
			case 60 <= a:
				ans[6]++
			}
		}
		for i := range ans {
			fmt.Println(ans[i])
		}
	}
}

Python: # AOJ 0184 Tsuruga Castle
# Python3 2018.6.19 bal4u

while True:
	n = int(input())
	if n == 0: break
	f = [0]*7
	for i in range(n):
		a = int(input())
		if a >= 60: f[6] += 1
		else: f[a//10] += 1
	print(*f, sep='\n')

Python: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0184

"""
import sys
from sys import stdin
from collections import defaultdict
input = stdin.readline


def main(args):
    while True:
        n = int(input())
        if n == 0:
            break
        visitors = defaultdict(int)

        for _ in range(n):
            age = int(input())
            if age < 10:
                visitors['under10'] += 1
            elif age < 20:
                visitors['10s'] += 1
            elif age < 30:
                visitors['20s'] += 1
            elif age < 40:
                visitors['30s'] += 1
            elif age < 50:
                visitors['40s'] += 1
            elif age < 60:
                visitors['50s'] += 1
            else:
                visitors['60s+'] += 1

        print(visitors['under10'])
        print(visitors['10s'])
        print(visitors['20s'])
        print(visitors['30s'])
        print(visitors['40s'])
        print(visitors['50s'])
        print(visitors['60s+'])



def main2(args):
    while True:
        n = int(input())
        if n == 0:
            break
        age = [0] * (120 + 1)

        for _ in range(n):
            n = int(input())
            age[n] += 1

        print(sum(age[0:10]))
        print(sum(age[10:20]))
        print(sum(age[20:30]))
        print(sum(age[30:40]))
        print(sum(age[40:50]))
        print(sum(age[50:60]))
        print(sum(age[60:]))


if __name__ == '__main__':
    main2(sys.argv[1:])

Python: while 1:
    n=int(input())
    if n==0:break
    arr=[0]*7
    for _ in range(n):
        a=int(input())
        if a>60: a=61
        arr[a//10]+=1
    for i in arr:print(i)

Python: while True:
    n = int(input())
    if n == 0:
        break
    To_lis = [0,0,0,0,0,0,0]
    for i in range(n):
        tosi = int(input())
        if tosi < 10:
            To_lis[0] += 1
        elif tosi < 20:
            To_lis[1] += 1
        elif tosi < 30:
            To_lis[2] += 1
        elif tosi < 40:
            To_lis[3] += 1
        elif tosi < 50:
            To_lis[4] += 1
        elif tosi < 60:
            To_lis[5] += 1
        else:
            To_lis[6] += 1
    for k in range(len(To_lis)):
        print(To_lis[k])

Python: while True:
    n=int(input())
    ans,ans1,ans2,ans3,ans4,ans5,ans6=0,0,0,0,0,0,0
    if n==0:
        break
    for i in range(n):
        a=int(input())
        a=a//10
        if a==0:
            ans+=1
        if a==1:
            ans1+=1
        if a==2:
            ans2+=1
        if a==3:
            ans3+=1
        if a==4:
            ans4+=1
        if a==5:
            ans5+=1
        if a>=6:
            ans6+=1
    print(ans)
    print(ans1)
    print(ans2)
    print(ans3)
    print(ans4)
    print(ans5)
    print(ans6)

Python: #無限ループ.0が来たら終わる
while True:
    num = int(input())
    if num == 0:break
    else:
        #カウントするためのリストを作成し、対応する数値を増やす
        num_list = [0 for a in range(7)]
        for _ in range(num):
            i = int(input())
            if i < 10:num_list[0] += 1
            elif i < 20:num_list[1] += 1
            elif i < 30:num_list[2] += 1
            elif i < 40:num_list[3] += 1
            elif i < 50:num_list[4] += 1
            elif i < 60:num_list[5] += 1
            else:num_list[6] += 1
            
        #リストの要素を順番に出力する
        for j in range(0,7):
            print(num_list[j])

Python: while True:
  x=[0 for i in range(7)]
  n=int(input())
  if n==0:
    break
  for i in range(n):
    a=int(input())
    if 0<=a<10:
      x[0]+=1
    elif 10<=a<20:
      x[1]+=1
    elif 20<=a<30:
      x[2]+=1
    elif 30<=a<40:
      x[3]+=1
    elif 40<=a<50:
      x[4]+=1 
    elif 50<=a<60:
      x[5]+=1
    else:
      x[6]+=1
  for i in range(7):
    print(x[i])

Python: while 1:
    n = int(input())
    if n == 0:
        break

    visitor = [0] * 7
    for _ in range(n):
        a = int(input())
        category = a // 10
        if category > 6:
            category = 6
        visitor[category] += 1

    for v in visitor:
        print(v)

Python: while True:
    c = [0] * 7
    n = input()
    if not n:
        break
    i = 0
    while i < n:
        c[min(input() // 10, 6)] += 1
        i += 1
    for i in c:
        print(i)

Python: while True:
    n = int(input())
    if n == 0:
        break

    ans = [0,0,0,0,0,0,0]
    for l in range(n):
        a = int(input())
        a = a // 10
        if a > 6:
            a = 6
        ans[a] += 1

    for i in range(7):
        print(ans[i])

Python: while 1:
    n=int(input())
    if not n:break
    a=[0]*7
    for i in range(n):
        a[min(int(input())//10,6)]+=1
    for i in a:
        print(i)

Python: def add_dic(x, dic):
  y = x // 10
  if y < 6:
    dic[y] += 1
  else:
    dic[6] += 1

def main():
  while True:
    n = int(input())
    if n == 0:
      break
    dic = [0] * 7
    for _ in range(n):
      add_dic(int(input()), dic)
    print(*dic, sep="\n")

main()

Python: while True:
    n=int(input())
    if n==0:
        break
    d0=0
    d1=0
    d2=0
    d3=0
    d4=0
    d5=0
    d6=0
    for i in range(n):
        x=int(input())
        if x<10:
            d0+=1
        elif x<20:
            d1+=1
        elif x<30:
            d2+=1
        elif x<40:
            d3+=1
        elif x<50:
            d4+=1
        elif x<60:
            d5+=1
        else:
            d6+=1
    print(d0)
    print(d1)
    print(d2)
    print(d3)
    print(d4)
    print(d5)
    print(d6)

Python: while True:
	n = int(input())
	if n == 0: break
	ans = [0 for _ in range(7)]
	for _ in range(n):
		age = int(input())
		if age < 10:
			ans[0] += 1
		elif age < 20:
			ans[1] += 1
		elif age < 30:
			ans[2] += 1
		elif age < 40:
			ans[3] += 1
		elif age < 50:
			ans[4] += 1
		elif age < 60:
			ans[5] += 1
		else:
			ans[6] += 1
	for a in ans:
		print(a)

Python: from collections import Counter

while True:
    n = int(input())
    if n == 0:
        break
    a = [int(input()) for _ in range(n)]
    cnt = Counter(i for i in range(7))
    for v in a:
        if v < 10:
            cnt[0] += 1
        elif v < 20:
            cnt[1] += 1
        elif v < 30:
            cnt[2] += 1
        elif v < 40:
            cnt[3] += 1
        elif v < 50:
            cnt[4] += 1
        elif v < 60:
            cnt[5] += 1
        else:
            cnt[6] += 1
    for i in range(7):
        print(cnt[i]-1)