#!/usr/bin/perl -w

use strict;

my %kata;
my %codes;

while (<>)
{
  if (/^(\d+)\s+(\w\w)(\w\w)(\w\w)/) {
    my ($level,$code1,$code2,$code3) = ($1,$2,$3,$4,$5);

    $codes{$level} = [$code1,$code2,$code3];
    $kata{$code1}++;
    $kata{$code2}++;
    $kata{$code3}++;
    #printf "%s,%s,%s\n",$code1,$code2,$code3;

  }
}

foreach my $k (sort keys %kata) {
  print "$k => ",$kata{$k},"\n";
}
print "#kata ",scalar(keys %kata),"\n";

