传统题 1000ms 256MiB

Brahc in a String Game

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Description

Brahc and Winlere are playing a game with a binary string. Brahc moves first. On each turn:

  • Brahc may delete any even-length substring consisting of identical characters.
  • Winlere may delete any odd-length substring consisting of identical characters.

When deleting a substring, its left side and right side will merge together. The whole string will not split.

The player who cannot make a move loses.

Before each round starts, they will take the binary string from the previous round's game and choose one contiguous segment to flip all bits in it (turning 0\texttt{0} into 1\texttt{1} and 1\texttt{1} into 0\texttt{0}).

Given that both Brahc and Winlere play optimally, determine the winner for each round.

Format

Input

The first line contains two integers n,q(1n2×105,1q106)n,q\,(1\leq n\leq2\times10^5, 1\leq q\leq 10^6), the length of the binary string and the number of rounds.

The second line contains nn numbers, each number is either 00 or 11, representing the initial binary string.

The next qq lines, each containing two integers l,r(1lrn)l,r\,(1\leq l\leq r\leq n), represent the segment to flip in the current round.

Output

qq lines, each line contains either Brahc\texttt{Brahc} or Winlere\texttt{Winlere}, representing the winner of the corresponding round.

Samples

6 1
1 0 1 1 0 0
5 6
Winlere

Hello ACM 2025

未参加
状态
已结束
规则
ACM/ICPC
题目
11
开始于
2025-8-14 13:00
结束于
2025-8-14 18:00
持续时间
5 小时
主持人
参赛人数
46