in_file = open('a2_wordlist.txt', 'r')
previous = ''
n = 1
for line in in_file:
    line = line.strip()
    info = line.split(';')
    if len(info) > 2:
        if previous == info[1]:
            print(f"{info[0]} {info[1]} line {n}")
        previous = info[1]
        n = n + 1

#closes file
in_file.close()
