using System; using System.Collections.Generic; using System.Text; class Program { static void Main() { string input = Console.ReadLine(); StringBuilder output = new StringBuilder(); List bytes = new List(); for (int i = 0; i < input.Length; i++) { if (i % 2 == 0) { bytes.Add(Convert.ToByte(input.Substring(i, 2), 16)); } } foreach (byte b in bytes) { for (int i = 0; i < 8; i++ ) { if (i % 2 == 0) { output.AppendFormat("<{0}>", Convert.ToString(b, 2).PadLeft(8, '0').Substring(i, 2)); } } } output.Replace("<00>", " ").Replace("<01>", ".").Replace("<10>", "#").Replace("<11>", Environment.NewLine); Console.Write(output.ToString()); } }