#!/usr/bin/python

import os
import sys
import re

files = os.listdir( sys.argv[1] )
files.sort()

for i in files:
    if( re.match("[ABCDEFGH]single[0-9]*\.tif$", i ) ):
        b = re.split("[(a-z)\.]+", i )
        if( int(b[1]) < 101 ):
            print os.path.join( sys.argv[1], i), b[0], 0, int(b[1])%101
        else:
            print os.path.join( sys.argv[1], i), b[0], 1, int(b[1])%101
