using System.Collections.Generic;
public static void Main()
var initialDict = new Dictionary<int, string>{
var newDict = initialDict.Select(x=>x.Value).Distinct().ToDictionary(x=>x, x=> initialDict.Where(kvp=>kvp.Value == x).Select(kvp=>kvp.Key));
Console.WriteLine(string.Join("\n", newDict.Select(x=>x.Key +": {"+ string.Join(", ", x.Value)+"}")));