using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; using System.Threading; namespace yukicoder_contest_312 { class _3 { static void Main (string[] args) { int n = int.Parse(Console.ReadLine()); string[] inA = Regex.Split(Console.ReadLine(), "[ ]"); int[] a = new int[n]; for (int i = 0; i <= n - 1; i++) a[i] = int.Parse(inA[i]); int turn = 0; string output; while(true) { a[turn] = process(a[turn]); Console.WriteLine(a[turn]); //Thread.Sleep(1000); int judge = a[0]; foreach (int i in a) { if (i > judge) judge = i; } if (judge == 1) { if (turn % 2 == 0) { output = "white"; break; } else { output = "black"; break; } } else { if (turn == a.Length - 1) turn = 0; else turn++; } } Console.WriteLine(output); } static int process (int num) { int output = 1; for (int i = 2; i <= num; i++) { if (num % i == 0) { if ((num / i) % 2 != 0) { if (output < num / i) { output = num / i; } } } } return output; } } }