using System.Collections.Generic;
using System.Text.RegularExpressions;
public void VinSolutions(string[] args)
public static void Main(string[] args)
Console.WriteLine("Enter your sentence:");
str = Console.ReadLine();
string[] sentence = Regex.Split(str, @"\W+");
List<string> newsentence = new List<string>();
StringBuilder builder = new StringBuilder();
foreach (string word in sentence)
for (int i = 1; i < k - ; i++)
if (word.ElementAt(i) != word.ElementAt(i + 1))
distinctCount = count + samecharcount;
char firstChar = word[0];
char lastChar = word[word.Length - 1];
newword = String.Concat(firstChar, distinctCount.ToString(), lastChar);
Console.Write(newword+" ");
Console.Write(builder.Append(word).Append(" "));