#!/usr/bin/pypy
# -*- python -*-
#
# git log | grep '^Date:' | grabdates
#
import sys
from utils import accumulator

tzs = accumulator()

for line in sys.stdin.readlines():
    split = line.split()
    if split[0] != 'Date:':
        print 'Funky line: ', line
        sys.exit(1)
    zone = int(split[-1])
    tzs.incr(zone)

zones = tzs.keys()
zones.sort()
for zone in zones:
    print '%05d %d' % (zone, tzs[zone])
