from typing import OrderedDict


def sortdict(d):
    """Returns ordered dict sorting input dict by keys."""
    return OrderedDict(((item[0], item[1]) for item in sorted(d.items(), key=lambda item: item[0])))