using System.IO;
using System;
using System.Collections.Generic;

class ETL {
  public static Dictionary<string, int> Transform(Dictionary<int, IList<string>> inp) {
    Dictionary<string, int> ret = new Dictionary<string, int>();
    foreach(KeyValuePair<int, IList<string>> entry in inp) {
      foreach(string val in entry.Value) {
        string v = val.ToLower();
        if(!ret.ContainsKey(v)) {
          ret.Add(v, entry.Key);
        }
      }
    }
    return ret;
  }
}
