import java.awt.*;
import java.io.*;
import hsa.Console;

public class NHL_team_record
{
    static Console c;

    public static void main (String[] args) throws IOException
    {
	NHL_team_record p = new NHL_team_record ();
	p.process ();
    }


    void process () throws IOException
    {
	c = new Console ();
	RightFormat rfs = new RightFormat (73);
	RightFormat edge = new RightFormat (7);

	String input;
	int i, j = 0, k, year = 0, current;
	int[] value = new int [10];

	FileReader f = new FileReader ("NHL_team_record.txt");
	BufferedReader b = new BufferedReader (f);

	while (b.ready ())
	{
	    input = b.readLine ();
	    if (input.length () > 0 && input.substring (0, 1).equals ("|"))
	    {
		j = 0;
		i = input.indexOf ("[[") + 2;
		if (i != -1)
		{
		    try
		    {
			current = Integer.parseInt (input.substring (i, i + 4));
		    }
		    catch (Exception e)
		    {
			continue;
		    }
		    if (year == 0)
			c.println (new RightFormat (80).format ("Records start at " + current));
		    else
		    {
			if (current != year + 1)
			{
			    c.setTextColor (Color.red);
			    c.println ("Missing " + year + "-" + (current - 1));
			    c.setTextColor (Color.black);
			}
		    }
		    year = current;

		    for (i = 0 ; i < 10 ; i++)
		    {
			j = input.indexOf ("||", j + 1) + 2;
			k = input.indexOf ("||", j);
			try
			{
			    value [i] = value [i] + Integer.parseInt (input.substring (j, k).trim ());
			}
			catch (Exception e)
			{
			    continue;
			}
		    }
		}
	    }
	}
	if (year < 2006)
	{
	    c.setTextColor (Color.red);
	    c.println ("Missing 2006-07");
	    c.setTextColor (Color.black);
	}

	if (value [0] == 0)
	{
	    for (i = 0 ; i < 9 ; i++)
		value [i] = value [i + 1];
	}
	c.println (rfs.format ("GP:") + edge.format ("" + value [0]) + rfs.format ("W:") + edge.format ("" + value [1]) + rfs.format ("L:") + edge.format ("" + value [2]) + rfs.format ("T:") + edge.format ("" + value [3]) + rfs.format ("OTL:") + edge.format ("" + value [4]) + rfs.format ("Pts:") + edge.format ("" + value [5]) + rfs.format ("GF:") + edge.format ("" + value [6]) + rfs.format ("GA:") + edge.format ("" + value [7]) + rfs.format ("PIM:") + edge.format ("" + value [8]));
    }
}
