file = open("result_file/call_seq.txt")
data_file = open("result_file/data.txt", 'w')
if __name__ == '__main__':
    one_seq = file.readline()
    seq_list = [one_seq]
    count_list = [1]
    while 1:
        one_seq = file.readline()
        if not one_seq:
            break
        if one_seq not in seq_list:
            seq_list.append(one_seq)
            count_list.append(1)
        else:
            index = seq_list.index(one_seq)
            count_list[index] = count_list[index] + 1
    i = 0
    for line in seq_list:
        line = line.strip("\n")
        data_file.write(line+"  "+str(count_list[i])+"\n")
        i += 1
    print("success")


