#!/usr/bin/env python3

from sys import argv, exit

if len(argv) !=3:
    print("Usage %s [parse file] [output file]" % argv[0])
    exit(1)

with open(argv[1], 'r') as myfile:
    text=myfile.read()
myfile.close()
temp= text.split("ID:")
#print(temp)
for i in temp:
    info=i.split("Qualities:")

blocks_seen=set()
matches=set()
#blocks_seen.add(info[1])
print (len(info))
for j in range(len(info)):
    #for line in info[j]:
    print (info[j])
    if info[j] in blocks_seen:
        print("Match found")
        matches.add(j)
    else:
        blocks_seen.add(info[j])
print(matches)
#print (info[1])
