def sort_dict_by_value(d):
    """ Returns the keys of dictionary d sorted by their values """
    items=list(d.items())
    backitems=[[v[1],v[0]] for v in items]
    backitems.sort()
    return [backitems[i][1] for i in range(0, len(backitems))]