#!/usr/bin/python3

## ============================ One time initializations ========================
#fileName = "testdata.txt" # this generates an error
fileName = "female-first.txt"


## ============================ Open and process file(s) ========================

try:
    inFile = open(fileName,'r')

    count = 1
    runFlag = True
    while(runFlag):            # Process while true
#        print(count,line.rstrip("\n"))
        line = inFile.readline()
        if line == "":
            runFlag == False
        else:
            line = line.rstrip("\n")
            print(count,line)
            count = count + 1

except:
    print("Some error occurred. Ending here")
    exit(-1)

inFile.close()
