data = """
FACILITY_DATA_OFFSET_START = 0x13D794
FACILITY_DATA_OFFSET_END = 0x13D8D4
SCENERY_MINIMAP_COLOUR_DATA_OFFSET_START = 0x13D8D4
SCENERY_MINIMAP_COLOUR_DATA_OFFSET_END = 0x13DC91
CREW_UFO_DOWNED_OFFSET_START = 0x13E560
CREW_UFO_DOWNED_OFFSET_END = 0x13E790
CREW_UFO_DEPOSIT_OFFSET_START = 0x13E790
CREW_UFO_DEPOSIT_OFFSET_END = 0x13E9C0
RESEARCH_DATA_OFFSET_START = 0x13EE80
RESEARCH_DATA_OFFSET_END = 0x13F954
BUILDING_COST_STRUCT_OFFSET_START = 0x1405C0
BUILDING_COST_STRUCT_OFFSET_END = 0x14080C
ORGANISATION_DATA_OFFSET_START = 0x141468
ORGANISATION_DATA_OFFSET_END = 0x141660
BUILDING_INFILTRATION_SPEED_OFFSET_START = 0x1423EC
BUILDING_INFILTRATION_SPEED_OFFSET_END = 0x1424B0
ORGANISATION_INFILTRATION_SPEED_OFFSET_START = 0x1424B0
ORGANISATION_INFILTRATION_SPEED_OFFSET_END = 1320224
BASELAYOUT_OFFSET_START = 0x14258C
BASELAYOUT_OFFSET_END = 0x14298C

VEHICLE_NAME_STRTAB_OFFSET_START = 0x1495A2
VEHICLE_NAME_STRTAB_OFFSET_END = 0x14976E
AGENT_EQUIPMENT_NAMES_OFFSET_START = 0x149770
AGENT_EQUIPMENT_NAMES_OFFSET_END = 0x149DB0
BUILDING_NAME_STRTAB_OFFSET_START = 0x149DD2
BUILDING_NAME_STRTAB_OFFSET_END = 0x14A66A
FACILITY_STRTAB_OFFSET_START = 0x14A66C
FACILITY_STRTAB_OFFSET_END = 0x14A7A7
VEHICLE_EQUIPMENT_NAMES_OFFSET_START = 0x14A7A9
VEHICLE_EQUIPMENT_NAMES_OFFSET_END = 1354564
BUILDING_FUNCTION_STRTAB_OFFSET_START = 0x14AB46
BUILDING_FUNCTION_STRTAB_OFFSET_END = 0x14ADCB
ALIEN_BUILDING_NAME_STRTAB_OFFSET_START = 0x14AD23
ALIEN_BUILDING_NAME_STRTAB_OFFSET_END = 0x14ADCB
ORGANISATION_NAME_STRTAB_OFFSET_START = 0x14AF11
ORGANISATION_NAME_STRTAB_OFFSET_END = 0x14B02E
RESEARCH_NAME_STRTAB_OFFSET_START = 0x14E3BA
RESEARCH_NAME_STRTAB_OFFSET_END = 0x14EA20
RESEARCH_DESCRIPTION_STRTAB_OFFSET_START = 0x14EA22
RESEARCH_DESCRIPTION_STRTAB_OFFSET_END = 0x1501F1
UFOPAEDIA_GROUP_STRTAB_OFFSET_START = 0x152ADD
UFOPAEDIA_GROUP_STRTAB_OFFSET_END = 0x152B56
AGENT_TYPE_NAMES_OFFSET_START = 0x153C0F
AGENT_TYPE_NAMES_OFFSET_END = 0x153EA0

AGENT_INFILTRATION_SPEED_OFFSET_START = 0x15541C
AGENT_INFILTRATION_SPEED_OFFSET_END = 0x155454
AGENT_TYPE_DATA_OFFSET_START = 0x155574
AGENT_TYPE_DATA_OFFSET_END = 0x1568EA
ORGANISATION_VEHICLE_PARK_DATA_OFFSET_START = 0x188EA8
ORGANISATION_VEHICLE_PARK_DATA_OFFSET_END = 1609496
ORGANISATION_STARTING_RELATIONSHIPS_DATA_OFFSET_START = 0x189040
ORGANISATION_STARTING_RELATIONSHIPS_DATA_OFFSET_END = 1612928
VEHICLE_DATA_OFFSET_START = 0x189C8C
VEHICLE_DATA_OFFSET_END = 0x18ACCA
VEHICLE_EQUIPMENT_DATA_OFFSET_START = 0x18AD48
VEHICLE_EQUIPMENT_DATA_OFFSET_END = 1618400
VEHICLE_WEAPON_DATA_OFFSET_START = 0x18B1E0
VEHICLE_WEAPON_DATA_OFFSET_END = 1619248
VEHICLE_ENGINE_DATA_OFFSET_START = 0x18B534
VEHICLE_ENGINE_DATA_OFFSET_END = 1619318
VEHICLE_GENERAL_EQUIPMENT_DATA_OFFSET_START = 0x18B576
VEHICLE_GENERAL_EQUIPMENT_DATA_OFFSET_END = 1619552
BULLETSPRITE_DATA_UFO2P_OFFSET_START = 0x18B660
BULLETSPRITE_DATA_UFO2P_OFFSET_END = 0x18B7A4
PROJECTILESPRITES_DATA_UFO2P_OFFSET_START = 0x18B7A4
PROJECTILESPRITES_DATA_UFO2P_OFFSET_END = 0x18B9C0
VEHICLE_EQUIPMENT_LAYOUT_OFFSET_START = 0x18B9C0
VEHICLE_EQUIPMENT_LAYOUT_OFFSET_END = 1629104
ECONOMY_DATA1_OFFSET_START = 0x18DBB0
ECONOMY_DATA1_OFFSET_END = 0x18E2D2
ECONOMY_DATA2_OFFSET_START = 0x18E2D4
ECONOMY_DATA2_OFFSET_END = 0x18E41E
ECONOMY_DATA3_OFFSET_START = 0x18E7E8
ECONOMY_DATA3_OFFSET_END = 0x18EF62
CREW_ALIEN_BUILDING_OFFSET_START = 0x191BA4
CREW_ALIEN_BUILDING_OFFSET_END = 0x191E08
ORGANISATION_RAID_LOOT_DATA_OFFSET_START = 0x192004
ORGANISATION_RAID_LOOT_DATA_OFFSET_END = 1648216
RAWSOUND_OFFSET_START = 0x19337C
RAWSOUND_OFFSET_END = 0x19693C
DAMAGE_TYPE_DATA_OFFSET_START = 0x2020A0
DAMAGE_TYPE_DATA_OFFSET_END = 0x2020B0
BULLETSPRITE_DATA_TACP_OFFSET_START = 0x202254
BULLETSPRITE_DATA_TACP_OFFSET_END = 0x20245E
PROJECTILESPRITES_DATA_TACP_OFFSET_START = 0x20245E
PROJECTILESPRITES_DATA_TACP_OFFSET_END = 0x202656
DAMAGE_TYPE_NAMES_OFFSET_START = 0x2E25E1
DAMAGE_TYPE_NAMES_OFFSET_END = 0x2E26B9
AGENT_EQUIPMENT_SET_BUILTIN_DATA_OFFSET_START = 0x300E70
AGENT_EQUIPMENT_SET_BUILTIN_DATA_OFFSET_END = 0x3015A0
DAMAGE_MODIFIER_DATA_OFFSET_START = 0x30165C
DAMAGE_MODIFIER_DATA_OFFSET_END = 0x301998
AGENT_PAYLOAD_DATA_OFFSET_START = 0x301998
AGENT_PAYLOAD_DATA_OFFSET_END = 0x302020
AGENT_ARMOR_DATA_OFFSET_START = 0x302020
AGENT_ARMOR_DATA_OFFSET_END = 0x3020B6
AGENT_WEAPON_DATA_OFFSET_START = 0x3020B6
AGENT_WEAPON_DATA_OFFSET_END = 0x3022F6
AGENT_EQUIPMENT_DATA_OFFSET_START = 0x3022F6
AGENT_EQUIPMENT_DATA_OFFSET_END = 0x302914
AGENT_GENERAL_DATA_OFFSET_START = 0x302914
AGENT_GENERAL_DATA_OFFSET_END = 0x302B00
AGENT_EQUIPMENT_SET_SCORE_REQUIREMENT_DATA_OFFSET_START = 0x302B00
AGENT_EQUIPMENT_SET_SCORE_REQUIREMENT_DATA_OFFSET_END = 0x302B8C
AGENT_EQUIPMENT_SET_SCORE_ALIEN_DATA_OFFSET_START = 0x302B8C
AGENT_EQUIPMENT_SET_SCORE_ALIEN_DATA_OFFSET_END = 0x302FEC
AGENT_EQUIPMENT_SET_SCORE_HUMAN_DATA_OFFSET_START = 0x302FEC
AGENT_EQUIPMENT_SET_SCORE_HUMAN_DATA_OFFSET_END = 0x30367C
"""


def hexify(line):
    (preline, valstr) = line.rsplit(" ", maxsplit=1)
    try:
        val = int(valstr)
    except ValueError:
        return line
    hexstr = "0x" + hex(val).upper()[2:]
    return f"{preline} {hexstr}"


def sortify(lines):
    return sorted(lines, key=lambda line: int(line.split(" ")[-1], 16))


def main():
    lines = sortify(hexify(line) for line in data.splitlines() if line)
    print("\n".join(lines))




main()
