import json
import sys

def extractValues(jsonObj):
	if (type(jsonObj) in [int, float, bool, unicode]):
		return [jsonObj]
		
	valueList = []
	for key in jsonObj.keys():
		value = jsonObj[key]
		typeof_value = type(value)
		if (value is None):
			pass
		elif (typeof_value == list):
			for obj in value:
				valueList += extractValues(obj)
		elif (typeof_value == dict and value is not None):
			# print(value)
			valueList += extractValues(value)
		elif (typeof_value in [int, float, bool, unicode]):
			valueList.append(value)
		else:
			print("unknown type: " + str(typeof_value))
			print(key, value)
			raise Exception("unknown type")
	return valueList

def extractValuesFromFile(filename):
	with open(filename) as f:
		jsonString = f.read()

	jsonObj = json.loads(jsonString)
	# print(jsonObj)

	values = set(extractValues(jsonObj))
	#print(values)
	#print("*"*40)

	for v in values:
		print(v)


for filename in sys.argv[1:]:
	extractValuesFromFile(filename)	