import json
import sys
from collections import OrderedDict
L = json.load(sys.stdin, object_pairs_hook=OrderedDict)
seen = OrderedDict()
for d in L:
oid = d["obj_id"]
if oid not in seen:
seen[oid] = d
json.dump(seen.values(), sys.stdout, indent=2)
aW1wb3J0IGpzb24KaW1wb3J0IHN5cwpmcm9tIGNvbGxlY3Rpb25zIGltcG9ydCBPcmRlcmVkRGljdAoKTCA9IGpzb24ubG9hZChzeXMuc3RkaW4sIG9iamVjdF9wYWlyc19ob29rPU9yZGVyZWREaWN0KQpzZWVuID0gT3JkZXJlZERpY3QoKQpmb3IgZCBpbiBMOgogICAgb2lkID0gZFsib2JqX2lkIl0KICAgIGlmIG9pZCBub3QgaW4gc2VlbjoKICAgICAgICBzZWVuW29pZF0gPSBkCgpqc29uLmR1bXAoc2Vlbi52YWx1ZXMoKSwgc3lzLnN0ZG91dCwgIGluZGVudD0yKQ==
WwogIHsmcXVvdDtvYmpfaWQmcXVvdDs6IDEyMywKICAgICZxdW90O2xvY2F0aW9uJnF1b3Q7OiB7CiAgICAgICZxdW90O3gmcXVvdDs6IDEyMywKICAgICAgJnF1b3Q7eSZxdW90OzogMzIzCiAgfX0sCiAgeyZxdW90O29ial9pZCZxdW90OzogMTMsCiAgICAmcXVvdDtsb2NhdGlvbiZxdW90OzogewogICAgICAmcXVvdDt4JnF1b3Q7OiAyMywKICAgICAgJnF1b3Q7eSZxdW90OzogMzMzCiAgfX0sCiB7JnF1b3Q7b2JqX2lkJnF1b3Q7OiAxMjMsCiAgICAmcXVvdDtsb2NhdGlvbiZxdW90OzogewogICAgICAmcXVvdDt4JnF1b3Q7OiAxMjIsCiAgICAgICZxdW90O3kmcXVvdDs6IDEzMwogIH19Cl0K
[
{"obj_id": 123,
"location": {
"x": 123,
"y": 323
}},
{"obj_id": 13,
"location": {
"x": 23,
"y": 333
}},
{"obj_id": 123,
"location": {
"x": 122,
"y": 133
}}
]