#! /usr/local/bin/python

import sys
import os
	
prog = sys.argv[1]
files = sys.argv[2:]

for x in files:
	command = prog+' '+x
	result = os.system(command)
	if result != 0:
		print 'command \''+command+'\' failed with error code ',
		print str(result)
