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

namespace StdinToStdout
{
	/// <summary>
	/// Simply takes anything from standard input and writes it directly to standard output.
	/// </summary>
	public class Program
	{
		static void Main(string[] args)
		{
			Stream inputStream = Console.OpenStandardInput(1);
			Stream outputStream = Console.OpenStandardOutput(1);
			// Stream errorStream = Console.OpenStandardError();
			using (StreamReader sr = new StreamReader(inputStream, Encoding.Default))
			using (StreamWriter sw = new StreamWriter(outputStream, Encoding.Default))
			{
				char[] buffer = new char[1];
				while (!sr.EndOfStream)
				{
					int readLength = sr.Read(buffer, 0, 1);
					sw.Write(buffer, 0, readLength);
				}
				inputStream.Flush();
				outputStream.Flush();
			}
		}
	}
}
