#!/usr/bin/perl

my %af=();


$file=shift;
open in,$file;

while(<in>){
$linea=$_;
chop $linea;
@vals=split(//,$linea);
$len=$#vals+1;
#print "$len\n";

foreach $i (@vals) 
{ 
$af{$i}++; 
$totale++;
} 



}

close in;

foreach $k (sort(keys(%af))) {

print "$k ".($af{$k}/$totale)."\n"; 
}
