#!/usr/bin/python
import re
import os
from sets import Set
if __name__ == "__main__":
logFile = open('log','r')
log = logFile.readlines()
logFile.close()
pathMask = Set()
fileMask = Set()
for line in log:
match = re.search("\t\w\t(.*)", line)
if match is None:
continue
fullFileName = match.group(1)
filePath = os.path.dirname(fullFileName)
if filePath:
path = os.path.basename(filePath)
if str(os.path.split(filePath)[0]).split('/')[0]:
path = str(os.path.split(filePath)[0]).split('/')[0]
pathMask.add(path)
else:
fileMask.add(fullFileName)
print sorted(pathMask)
print sorted(fileMask)