#!/usr/bin/python

import sys,random,codecs

if len(sys.argv) != 3:
	print "Usage: fix_label_classes_subst.py <source label file> <target label file>"
	sys.exit(1)

ofile = open(sys.argv[2],"w")

for line in codecs.open(sys.argv[1]):
	line = line.strip()
	if "subst:" in line:
		ofile.write(line + "\n")
	else:
		ofile.write("subst:" + line + "\n")
