using System;
class compression
{
public class Compression_Letters
public static void printCompression(String str)
int n = str.Length;
for (int i = 0; i < n; i++)
int count = 1;
while (i < n - 1 && str[i] == str[i + 1])
count++;
i++;
}
Console.Write(str[i]);
Console.Write(count);
public static void Main(String[] args)
String str = "wwwwaaadexxxxxxywww";
printCompression(str);