customer_dict = {3:30, 1:22, 2:22}
sorted_values = [30, 22, 22]
sorted_dict = {}
for i in sorted_values:
for k in customer_dict.keys():
if customer_dict[k] == i:
sorted_dict[k] = customer_dict[k]
for x in list(sorted_dict)[:3]:
print(str(x) + ',' + str(sorted_dict[x]))