﻿namespace topCoder
{
	using System;
	using System.Collections.Generic;

	class main
	{
		static void Main(string[] args)
		{
			//WritingWords o = new WritingWords();
			//Console.WriteLine(o.write("ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"));

			//LongWordsDiv2 o = new LongWordsDiv2();
			//Console.WriteLine(o.find("VAMOSGIMNASIA"));

			MovingRooksDiv2 o = new MovingRooksDiv2();
			Console.WriteLine(o.move(new int[] { 6, 7, 5, 4, 3, 2, 1, 0 }, new int[] { 7, 0, 1, 2, 3, 4, 5, 6 }));

			Console.ReadLine();
		}
	}
}
