#!/usr/bin/python
import sys, suffixtree

lines_out = []

lines_in = sys.stdin.readlines()
for l in lines_in:
	if l[0:29] == "/home/blasum/P/minlog/minlog/":
		f = l[29:].split(':')
		file = f[0]
		line = f[0] + ':' + f[1]
		lines_out.append(line)

print ("NUmber of lines " + str(len(lines_out)))
suffixtree.build(lines_out)
suffixtree.supermax(suffixtree.root,'','tree:|',0)

