# $B<B9TJ}K!!'JQ99$7$?$$HO0O$r!V(B# tanitani START$B!W$H!V(B# tanitani END$B!W$G$/$/$k!#(B
# <$BNc(B>
# # node infos
# x y shape bclr(r,g,b) bwidth r1 r2 clr(r,g,b) ltype lclr(r,g,b) lpos lstr
# # tanitani START
# 431.0858 200.6057 3 0 0 0 0.544484 20.57895 5.81579 173 255 47 1 -1 -1 -1 4 aichi
# .............
# 243.55 325.813 3 0 0 0 0.544484 20.57895 5.81579 173 255 47 1 -1 -1 -1 4 yamanashi
# # tanitani END
# 339.9444 212.8759 0 0 0 0 0.544484 0.8947368 0.8947368 0 238 0 4 -1 -1 -1 4


%A = ("aichi" => "173 255 47","akita" => "255 165 0","aomori" => "255 165 0","chiba1" => "255 255 0","chiba2" => "255 255 0","ehime" => "0 0 255","fukuoka" => "128 0 128","fukushima" => "255 165 0","gifu" => "173 255 47","gunma" => "255 255 0","hiroshima" => "0 255 255","hokkaido1" => "255 0 0","hokkaido2" => "255 0 0","hyogo1"=>"0 128 0","hyogo2"=>"0 128 0","ibaraki"=>"255 255 0","ishikawa"=>"173 255 47","iwate1"=>"255 165 0","iwate2"=>"255 165 0","kagawa1"=>"0 0 255","kagawa2" => "0 0 255","kagoshima" => "128 0 128","kanagawa" => "255 255 0","kouchi1" => "0 0 255","kouchi2" => "0 0 255","kumamoto1" => "128 0 128","kumamoto2" => "128 0 128","kyoto" => "0 128 0","mie" => "0 128 0","miyagi" => "255 165 0","miyazaki" => "128 0 128","nagano1" => "173 255 47","nagano2" => "173 255 47","nagasaki1" => "128 0 128","nagasaki2" => "128 0 128","naha" => "128 0 128","nakijin" => "128 0 128","nara" => "0 128 0","nhk" => "255 255 0","nigata1" => "173 255 47","nigata2" => "173 255 47","oita" => "128 0 128","okayama" => "0 255 255","osaka" => "0 128 0","saga" => "128 0 128","shimane" => "0 255 255","shizuoka1" => "173 255 47","shizuoka2" => "173 255 47","tochigi" => "255 255 0","tokushima" => "0 0 255","tokyo" => "255 255 0","toyama" => "173 255 47","wakayama" => "0 128 0","yamagata" => "255 165 0","yamaguchi" => "0 255 255","yamanashi" => "173 255 47");

$flag = 0;
while(<STDIN>){
    if($flag == 1){
	if($_ =~"# tanitani END"){
	    $flag = 0;
	}else{
	    @tmp = split(/\s/,);
	    chomp(@tmp);
	    print $tmp[0] . " " . $tmp[1] . " " . $tmp[2] . " " . $tmp[3] . " " . $tmp[4] . " " . $tmp[5] . " " . $tmp[6] . " " . $tmp[7] . " " . $tmp[8] . " "  . $A{$tmp[17]} . " " .$tmp[12] . " " . $tmp[13] . " " . $tmp[14] . " " . $tmp[15] . " " . $tmp[16] . " " . $tmp[17] . "\n";
	}
    }else{
	if($_ =~ "# tanitani START"){
	    $flag = 1;
	}else{
	    print $_;
	}
    }
}
