#!/usr/athena/bin/perl

%month = ('Jan', 0,
	  'Feb', 31,
	  'Mar', 59,
	  'Apr', 90,
	  'May', 120,
	  'Jun', 151,
	  'Jul', 181,
	  'Aug', 212,
	  'Sep', 243,
	  'Oct', 273,
	  'Nov', 304,
	  'Dec', 334);

while(<>){
    /(\d\d\d\d) ([^ ]+) has locked:/;
    $year = $1;
    split;
    $mon = $_[1];
    $day = $_[2];

    $date = ($year*366)+$month{$mon}+$day;
    $date = int($date);
    if(!$min){
	$min = $date;
    }
    $proc{$date}++;
}

$max = $date;

for $t ($min..$max){
    $nt = $t-$min;
    $proc{$t} = 0 unless $proc{$t};
    print "$nt $proc{$t}\n";
}
