import sys import json def index(type_): return { "verb": 00, "attribute": 10, "noun": 20, "pronoun": 30, "correlative": 40, "preposition": 50, "article": 60, "number": 70, "other": 80, }[type_] def main(): data = json.loads(sys.stdin.read()) data_ = sorted(data, key = lambda entry: index(entry["type"])) print(json.dumps(data_, indent="\t")) main()