{"task": {"agent_timeout": 600, "task": "942", "verifier_timeout": 7200, "instruction": "Please implement a Python 3 solution to the below problem.\nReason through the problem and:\n1. Restate the problem in plain English\n2. Conceptualize a solution first in plain English\n3. Write a pseudocode solution\n4. Save your solution as solution.py\nNo outside libraries are allowed.\n\n[BEGIN PROBLEM]\nFarmer John is attempting to take a photograph of his herd of cows.  From past\nexperience, he knows this particular endeavor never usually ends well.  \n\nThis time, Farmer John has purchased an expensive drone in order to take an\naerial photo. To make the photo look as good as possible, he wants his cows all\nto be facing the same direction when the photo is taken.  The cows are currently arranged\nin an  $N \\times N$ grid ($2 \\leq N \\leq 1000$) inside a fenced-in square\npasture,  for example:\n\n\nRLR\nRRL\nLLR\n\nHere, an 'R' means a cow facing right, and an 'L' means a cow facing left. Since\nthe cows are packed together, Farmer John cannot walk up to an individual cow to\nmake it turn around.  All he can do is shout at any row or column of cows to\nturn around, causing L's to change to R's and R's to L's within the row or\ncolumn in question.  Farmer John can yell at as many rows or columns as he\nwants, even at the same row or column more than once.\n\nAs expected, Farmer John observes that he is unable to make his cows all face\none common direction.  The best he can do is get all but one of the cows to face\nthe same direction.  Please determine the identity of such a cow.\n\nINPUT FORMAT:\nThe first line contains $N$.  The next $N$ lines describe rows $1 \\ldots N$ in \nthe grid of cows, each containing a string of length $N$.\n\nOUTPUT FORMAT:\nPrint the row and column index of a cow such that if that cow were flipped,\nFarmer John could make all his cows face the same direction.  If no such cow\nexists, print -1.  If multiple such cows exist, print the one with the  smallest\nrow index, or if multiple such cows have the same smallest row index, print the\none with the smallest column index.\n\nSAMPLE INPUT:\n3\nRLR\nRRL\nLLR\nSAMPLE OUTPUT: \n1 1\n\nIn the example above, the cow in row 1, column 1 (the upper-left corner) is the\noffending cow, since Farmer John can shout at row 2 and column 3 to make all\nother cows face left, with just this cow facing right.\n\n\nProblem credits: Brian Dean\n\n[END PROBLEM]\n", "memory": "2048m", "runnable": false, "difficulty": "medium", "language": "", "cpus": 1, "instruction_truncated": false, "category": "python_programming", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "usaco", "tags": ["python", "programming", "usaco"]}, "runs": []}