import locale
from datetime import datetime
s = """
6 Jan @ 4:03pm
8 Jan @ 2:17pm
9 Dec @ 4:00am
9 Dec @ 5:14pm
9 Dec @ 5:28am
10 Jan @ 2:55pm
10 Jan @ 4:21am
10 Jan @ 7:14pm
12 Dec @ 7:48pm
12 Dec @ 7:50pm
12 Jan @ 3:32pm
13 Dec @ 3:43pm
13 Dec @ 5:02am
13 Dec @ 5:24am
14 Jan @ 5:17pm
15 Jan @ 5:29am
21 Dec @ 3:56pm
21 Dec @ 9:40am
"""
locale .setlocale ( locale .LC_ALL , "en_US.utf8" )
fmt = "%d %b @ %I:%M%p"
lines = filter ( len , str .split ( s, "\n " ) )
for d in sorted ( map ( lambda line: datetime .strptime ( line, fmt) , lines) ) :
print ( datetime .strftime ( d, fmt) )
aW1wb3J0IGxvY2FsZQoKZnJvbSBkYXRldGltZSBpbXBvcnQgZGF0ZXRpbWUKCnMgPSAiIiIKNiBKYW4gQCA0OjAzcG0KOCBKYW4gQCAyOjE3cG0KOSBEZWMgQCA0OjAwYW0KOSBEZWMgQCA1OjE0cG0KOSBEZWMgQCA1OjI4YW0KMTAgSmFuIEAgMjo1NXBtCjEwIEphbiBAIDQ6MjFhbQoxMCBKYW4gQCA3OjE0cG0KMTIgRGVjIEAgNzo0OHBtCjEyIERlYyBAIDc6NTBwbQoxMiBKYW4gQCAzOjMycG0KMTMgRGVjIEAgMzo0M3BtCjEzIERlYyBAIDU6MDJhbQoxMyBEZWMgQCA1OjI0YW0KMTQgSmFuIEAgNToxN3BtCjE1IEphbiBAIDU6MjlhbQoyMSBEZWMgQCAzOjU2cG0KMjEgRGVjIEAgOTo0MGFtCiIiIgoKbG9jYWxlLnNldGxvY2FsZShsb2NhbGUuTENfQUxMLCAiZW5fVVMudXRmOCIpCgpmbXQgPSAiJWQgJWIgQCAlSTolTSVwIgpsaW5lcyA9IGZpbHRlcihsZW4sIHN0ci5zcGxpdChzLCAiXG4iKSkKZm9yIGQgaW4gc29ydGVkKG1hcChsYW1iZGEgbGluZTogZGF0ZXRpbWUuc3RycHRpbWUobGluZSwgZm10KSwgbGluZXMpKToKCQoJcHJpbnQoZGF0ZXRpbWUuc3RyZnRpbWUoZCwgZm10KSkK