#!/usr/bin/perl
use warnings;
use strict;

while(<STDIN>){
	chomp;
	my @t=split(/ /);
	if ($_ !~ /^;/ && @t > 6 && $t[6] ne "ignore_time_segment_in_scoring"){
		my $label    = $t[0];
		my $loc      = $t[2];
		#$label =~ s/_/-/g;
		#$loc   =~ s/_/-/g;
		my $time     = int(0.5+$t[3]*100);
		my $end      = int(0.5+$t[4]*100);
#print $_;
		if( @t > 7){
			print $label."#".$loc."#".sprintf("%06d",$time)."#".sprintf("%06d",$end)." ";
			for(my $w=6;$w<@t;$w++){
				print $t[$w]." ";
			}
			print "\n";
		}
	}
}
