sorted output dictionary