using System;
using System.IO;
using System.Linq;
class Program
{
static void Main()
{
string filePath = "input.txt";
string[] words = File.ReadAllText(filePath).Split(' ');
var wordCount = words.GroupBy(w => w.ToLower())
.ToDictionary(g => g.Key, g => g.Count());
string outputPath = "output.txt";
File.WriteAllLines(outputPath, wordCount.Select(kv => $"{kv.Key}: {kv.Value}"));
}
}