# n in a row

## Submit

File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

## Problem

A and B are playing n-in-a-row. The rule of this game is: two players put chess pieces onto a chess board that has the following positions: (1,1) on the upper left, and (n,n) on the lower right. If a player's n chess pieces form a row, a column, or a diagonal line, the other player loses.

A plays first, and there are m rounds. Please determine who won the game.

A game will end if and only if someone won, or there are no rounds left. If the upper conditions are fulfilled, the game ends, and the remaining rounds are ignored.

Inputs 2 numbers(n and m), which represent the size of the chessboard and the number of rounds.

x and y will be inputted in the next m lines. These show that the current player will put a chess piece on row x, column y.

Outputs a line, which include an integer x, which shows the number of rounds played when the game ends. Also, output a string S, which demonstrates the result of the game. These two outputs are separated using a space.

If A won, S is "milk!". If B won, S is "juice!". Otherwise, S is "drawn!".

## Options

exec is denied

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

```2 4
1 1
2 2
2 1
1 2```

## Sample output:

`3 milk!`

## Ranking

### Ruby2_

RankUserSizeTimeDateStatistics
1pooq130.05142019/08/14 04:38:280B / ?B / ?B

### Python_

RankUserSizeTimeDateStatistics
1Erik the Outgolfer140.03242020/11/14 09:04:010B / 10B / 3B

### Python3_

RankUserSizeTimeDateStatistics
1c_r_5160.03952019/05/01 09:33:580B / ?B / ?B
2Erik the Outgolfer160.04482020/11/14 09:04:120B / 10B / 5B

### PHP_

RankUserSizeTimeDateStatistics
1c_r_570.03922019/05/01 09:35:070B / ?B / ?B
2Erik the Outgolfer70.02352020/11/14 09:01:110B / 5B / 1B

### Common LISP_

RankUserSizeTimeDateStatistics
1pooq170.01822019/10/13 13:53:500B / ?B / ?B

### Arc_

RankUserSizeTimeDateStatistics
1pooq130.70062019/08/08 11:25:140B / ?B / ?B

### Clojure_

RankUserSizeTimeDateStatistics
1pooq160.60112019/08/10 05:30:370B / ?B / ?B

### Io_

RankUserSizeTimeDateStatistics
1pooq140.04992019/07/17 06:35:280B / ?B / ?B

### JavaScript_

RankUserSizeTimeDateStatistics
1pooq160.01192019/10/09 07:25:280B / ?B / ?B

### Tcl_

RankUserSizeTimeDateStatistics
1pooq140.01332019/08/19 11:21:290B / ?B / ?B

### Xtal_

RankUserSizeTimeDateStatistics
1pooq120.01252019/08/08 17:21:180B / ?B / ?B

### Crystal_

RankUserSizeTimeDateStatistics
1pooq140.00012019/08/12 18:06:570B / ?B / ?B

### REXX_

RankUserSizeTimeDateStatistics
1pooq120.01892019/10/13 20:39:150B / ?B / ?B

### PARI/GP_

RankUserSizeTimeDateStatistics
1pooq210.01162019/08/10 04:22:350B / ?B / ?B

### Squirrel_

RankUserSizeTimeDateStatistics
1pooq160.00012019/08/04 07:52:480B / ?B / ?B

### Prolog_

RankUserSizeTimeDateStatistics
1pooq210.01382019/10/14 07:10:440B / ?B / ?B

### Forth_

RankUserSizeTimeDateStatistics
1pooq100.01132019/08/15 13:20:070B / ?B / ?B

### BASIC_

RankUserSizeTimeDateStatistics
1pooq100.00012019/07/16 15:46:470B / ?B / ?B

### J_

RankUserSizeTimeDateStatistics
1pooq160.06992019/09/01 22:01:060B / ?B / ?B

### K_

RankUserSizeTimeDateStatistics
1pooq120.01412021/04/13 15:24:360B / ?B / ?B

### Jelly_

RankUserSizeTimeDateStatistics
1Erik the Outgolfer60.27672021/05/19 16:56:086B / 0B / 0B

### C_

RankUserSizeTimeDateStatistics
1Erik the Outgolfer240.01372020/11/14 09:01:410B / 13B / 10B

### C++_

RankUserSizeTimeDateStatistics
1pooq340.00022019/10/13 18:43:480B / ?B / ?B

### Rust_

RankUserSizeTimeDateStatistics
1pooq280.01122019/10/12 08:05:180B / ?B / ?B

### Pascal_

RankUserSizeTimeDateStatistics
1pooq270.00012019/10/13 16:29:010B / ?B / ?B

### Chapel_

RankUserSizeTimeDateStatistics
1pooq170.01212019/08/11 10:44:110B / ?B / ?B

### Maxima_

RankUserSizeTimeDateStatistics
1pooq180.44292019/10/17 12:17:290B / ?B / ?B

### Octave_

RankUserSizeTimeDateStatistics
1pooq130.33232019/07/16 14:05:410B / ?B / ?B

### REBOL_

RankUserSizeTimeDateStatistics
1pooq210.01852019/08/15 11:48:070B / ?B / ?B

### Asymptote_

RankUserSizeTimeDateStatistics
1pooq150.21302019/07/24 11:15:310B / ?B / ?B

### jq_

RankUserSizeTimeDateStatistics
1pooq90.01052019/07/15 19:00:330B / ?B / ?B

### Bash_

RankUserSizeTimeDateStatistics
1Erik the Outgolfer120.01442020/11/14 08:59:380B / 9B / 1B

### Bash (builtins)_

RankUserSizeTimeDateStatistics
1Erik the Outgolfer120.01432020/11/14 08:59:430B / 9B / 1B

### Zsh_

RankUserSizeTimeDateStatistics
1Erik the Outgolfer110.00662020/11/14 09:00:020B / 5B / 5B

### bc_

RankUserSizeTimeDateStatistics
1pooq100.01092019/07/24 04:48:470B / ?B / ?B

### dc_

RankUserSizeTimeDateStatistics
1pooq100.00012019/10/15 09:36:340B / ?B / ?B

### m4_

RankUserSizeTimeDateStatistics
1pooq70.00012019/08/19 12:55:370B / ?B / ?B

### Postscript_

RankUserSizeTimeDateStatistics
1pooq100.07162019/10/06 06:15:520B / ?B / ?B

### R_

RankUserSizeTimeDateStatistics
1pooq140.10552019/07/27 13:04:090B / ?B / ?B

### QCL_

RankUserSizeTimeDateStatistics
1pooq160.04232019/08/08 19:17:300B / ?B / ?B

### Labyrinth_

RankUserSizeTimeDateStatistics
1pooq250.05802021/04/01 17:50:430B / ?B / ?B

### ><>_

RankUserSizeTimeDateStatistics
1pooq120.05322019/10/16 11:06:090B / ?B / ?B
2Erik the Outgolfer120.06082020/11/14 08:58:570B / 6B / 5B

### FlogScript_

RankUserSizeTimeDateStatistics
1pooq100.24522020/12/25 11:47:210B / ?B / ?B

### Burlesque_

RankUserSizeTimeDateStatistics
1pooq110.01312019/08/03 08:00:130B / ?B / ?B

### FerNANDo_

RankUserSizeTimeDateStatistics
1Erik the Outgolfer1150.03992020/11/14 09:03:450B / 58B / 0B

### z80_

RankUserSizeTimeDateStatistics
1McBusLuck130.01202019/07/13 02:31:025B / 3B / 5B

### DOS_

RankUserSizeTimeDateStatistics
1McBusLuck152.62102019/05/18 05:44:435B / ?B / ?B

### goruby_

RankUserSizeTimeDateStatistics
1pooq100.01892019/08/21 05:19:550B / ?B / ?B

### Groovy_

RankUserSizeTimeDateStatistics
1pooq161.05922019/07/28 20:19:180B / ?B / ?B

### Scala_

RankUserSizeTimeDateStatistics
1pooq161.43842021/04/03 03:35:250B / ?B / ?B

### Language Ranking_

RankLangUserSizeScore
1JellyErik the Outgolfer610000
2PHPc_r_578571
3m4pooq78571
4jqpooq96666
5BASICpooq106000
6bcpooq106000
7Forthpooq106000
8gorubypooq106000
9Postscriptpooq106000
10dcpooq106000
11FlogScriptpooq106000
12Burlesquepooq115454
13ZshErik the Outgolfer115454
14Xtalpooq125000
15REXXpooq125000
16><>pooq125000
17BashErik the Outgolfer125000
18Bash (builtins)Erik the Outgolfer125000
19Kpooq125000
20z80McBusLuck134615
21Octavepooq134615
22Arcpooq134615
23Ruby2pooq134615
24Iopooq144285
25Rpooq144285
26Crystalpooq144285
27Tclpooq144285
28PythonErik the Outgolfer144285
29DOSMcBusLuck154000
30Asymptotepooq154000
31Python3c_r_5163750
32Groovypooq163750
33Squirrelpooq163750
34QCLpooq163750
35Clojurepooq163750
36Jpooq163750
37JavaScriptpooq163750
38Scalapooq163750
39Chapelpooq173529
40Common LISPpooq173529
41Maximapooq183333
42PARI/GPpooq212857
43REBOLpooq212857
44Prologpooq212857
45CErik the Outgolfer242500
46Labyrinthpooq252400
47Pascalpooq272222
48Rustpooq282142
49C++pooq341764
50FerNANDoErik the Outgolfer115521