public static void main( String... arguments )
	{
		try
		{
			String dna;

			// Retrieve the DNA dna from ...
			if( arguments.length == 1 )
			{
				// ... the command line arguments.
				dna = arguments[0];
			}
			else
			{
				InputStream input = null;

				try
				{
					if( arguments.length == 0 )
					{
						// ... piped input.
						input = System.in;
					}
					else if( arguments.length == 2 && arguments[0].equals( "-i" ) )
					{
						// ... file input.
						input = new FileInputStream( arguments[1] );
					}
					else
					{
						throw new IllegalArgumentException( "Invalid amount of parameters given" );
					}

					StringBuilder builder = new StringBuilder();

					for( int character = input.read(); character != -1; character = input.read() )
					{
						builder.append( (char) character );
					}

					dna = builder.toString();
				}
				finally
				{
					if( input != null )
					{
						input.close();
					}
				}
			}

			///////////////////////////////////////////////////////////////////////
			//                        Exercise solutions.                        //
			///////////////////////////////////////////////////////////////////////

			CodingContest contest = new CodingContest( new Sequence( dna.replaceAll( "\\s", "" ) ) );

			for( Solution solution : contest.getSolutions() )
			{
				System.out.println( solution );
			}
		}
		catch( Exception exception )
		{
			System.out.println( "Error: " + exception.getMessage() + "." );
			System.exit( -1 );
		}
	}