#reversejson.py
import sys, json
for i in sorted([json.loads(line) for line in sys.stdin], key=lambda x: x['date']):
print json.dumps(i)