sorting of input mappings