#!/usr/bin/env python
  
import sys
import string

lastkey = 'start'
lasttruekey = 'start'
lastfilekey = 'start'

file_count_list = []
filecount = 0

for line in sys.stdin:
    try:
        line = line.strip()
        key, value = line.split('\t')
    #filename, count = value.split(',')
        truekey, filekey = key.split(';;;;')
    
        value = int(value)

        if lasttruekey == 'start':
            lasttruekey = truekey
            lastfilekey = filekey

        if truekey == lasttruekey:
            if filekey == lastfilekey:
                filecount += value
            else:
                file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,filecount))
                lastfilekey = filekey
                filecount = value

        else:
            file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,filecount))
            print('{0:s}\t{1:s}'.format(lasttruekey,";;;;".join(file_count_list)))
            lasttruekey = truekey
            file_count_list = []
            filecount = value
            lastfilekey = filekey
    except:
        #print('ERRORERRORERRORERROR',line)
        None

file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,filecount))
print('{0:s}\t{1:s}'.format(lasttruekey,";;;;".join(file_count_list)))

8919485d4e8abaa6c0ce38bbd6c6f3a403e58f4b
<mask token>

<mask token>
for line in sys.stdin:
    try:
        line = line.strip()
        key, value = line.split('\t')
        truekey, filekey = key.split(';;;;')
        value = int(value)
        if lasttruekey == 'start':
            lasttruekey = truekey
            lastfilekey = filekey
        if truekey == lasttruekey:
            if filekey == lastfilekey:
                filecount += value
            else:
                file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,
                    filecount))
                lastfilekey = filekey
                filecount = value
        else:
            file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,
                filecount))
            print('{0:s}\t{1:s}'.format(lasttruekey, ';;;;'.join(
                file_count_list)))
            lasttruekey = truekey
            file_count_list = []
            filecount = value
            lastfilekey = filekey
    except:
        None
file_count_list.append('{0:s}::{1:d}'.format(lastfilekey, filecount))
print('{0:s}\t{1:s}'.format(lasttruekey, ';;;;'.join(file_count_list)))

<mask token>
lastkey = 'start'
lasttruekey = 'start'
lastfilekey = 'start'
file_count_list = []
filecount = 0
for line in sys.stdin:
    try:
        line = line.strip()
        key, value = line.split('\t')
        truekey, filekey = key.split(';;;;')
        value = int(value)
        if lasttruekey == 'start':
            lasttruekey = truekey
            lastfilekey = filekey
        if truekey == lasttruekey:
            if filekey == lastfilekey:
                filecount += value
            else:
                file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,
                    filecount))
                lastfilekey = filekey
                filecount = value
        else:
            file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,
                filecount))
            print('{0:s}\t{1:s}'.format(lasttruekey, ';;;;'.join(
                file_count_list)))
            lasttruekey = truekey
            file_count_list = []
            filecount = value
            lastfilekey = filekey
    except:
        None
file_count_list.append('{0:s}::{1:d}'.format(lastfilekey, filecount))
print('{0:s}\t{1:s}'.format(lasttruekey, ';;;;'.join(file_count_list)))

import sys
import string
lastkey = 'start'
lasttruekey = 'start'
lastfilekey = 'start'
file_count_list = []
filecount = 0
for line in sys.stdin:
    try:
        line = line.strip()
        key, value = line.split('\t')
        truekey, filekey = key.split(';;;;')
        value = int(value)
        if lasttruekey == 'start':
            lasttruekey = truekey
            lastfilekey = filekey
        if truekey == lasttruekey:
            if filekey == lastfilekey:
                filecount += value
            else:
                file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,
                    filecount))
                lastfilekey = filekey
                filecount = value
        else:
            file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,
                filecount))
            print('{0:s}\t{1:s}'.format(lasttruekey, ';;;;'.join(
                file_count_list)))
            lasttruekey = truekey
            file_count_list = []
            filecount = value
            lastfilekey = filekey
    except:
        None
file_count_list.append('{0:s}::{1:d}'.format(lastfilekey, filecount))
print('{0:s}\t{1:s}'.format(lasttruekey, ';;;;'.join(file_count_list)))

#!/usr/bin/env python
  
import sys
import string

lastkey = 'start'
lasttruekey = 'start'
lastfilekey = 'start'

file_count_list = []
filecount = 0

for line in sys.stdin:
    try:
        line = line.strip()
        key, value = line.split('\t')
    #filename, count = value.split(',')
        truekey, filekey = key.split(';;;;')
    
        value = int(value)

        if lasttruekey == 'start':
            lasttruekey = truekey
            lastfilekey = filekey

        if truekey == lasttruekey:
            if filekey == lastfilekey:
                filecount += value
            else:
                file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,filecount))
                lastfilekey = filekey
                filecount = value

        else:
            file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,filecount))
            print('{0:s}\t{1:s}'.format(lasttruekey,";;;;".join(file_count_list)))
            lasttruekey = truekey
            file_count_list = []
            filecount = value
            lastfilekey = filekey
    except:
        #print('ERRORERRORERRORERROR',line)
        None

file_count_list.append('{0:s}::{1:d}'.format(lastfilekey,filecount))
print('{0:s}\t{1:s}'.format(lasttruekey,";;;;".join(file_count_list)))
