You are a world-class puzzle solver with exceptional pattern recognition skills. Your task is to analyze puzzles, spot patterns, and provide direct solutions.
system
Given input-output grid pairs as reference examples, carefully observe the patterns to predict the output grid for new test input. Each pair follows the same transformation rule. Grids are 2D arrays represented as strings, with cells (colors) separated by spaces and rows by newlines.
Here are the input and output grids for the reference examples:
Example 1
Input:
Black Blue Red Black Green Blue
Blue Red Blue Red Blue Black
Black Red Blue Blue Green Blue
Blue Blue Blue Red Green Green
Green Black Green Blue Blue Green

Output:
Blue Black Blue Brown Brown
Brown Blue Brown Brown Blue
Black Yellow Blue Yellow Blue
Yellow Blue Blue Blue Brown
Blue Yellow Yellow Blue Black
Black Blue Black Blue Brown


Example 2
Input:
Blue Blue Red Red Black
Black Red Red Red Red
Red Green Green Black Red
Red Green Red Blue Green
Blue Green Blue Green Red
Blue Blue Black Red Black

Output:
Black Yellow Yellow Brown Yellow Black
Yellow Yellow Black Blue Brown Yellow
Yellow Yellow Brown Yellow Blue Black
Blue Yellow Brown Brown Brown Blue
Blue Black Yellow Yellow Blue Blue


Example 3
Input:
Blue Black Red Red Black Green
Black Black Blue Blue Blue Red
Red Green Green Green Red Green
Red Blue Black Green Black Blue
Green Green Green Green Red Blue
Red Red Black Black Black Blue

Output:
Brown Yellow Brown Blue Blue Blue
Black Blue Yellow Black Yellow Black
Yellow Blue Brown Brown Brown Black
Yellow Blue Brown Black Brown Black
Black Black Brown Blue Brown Yellow
Blue Black Yellow Yellow Brown Yellow


Here is the input grid for the test example:
Input:
Red Red Green Red
Red Red Black Blue
Red Blue Green Black
Green Green Red Green


Directly provide the output grids corresponding to the given test input grids, based on the patterns observed in the reference examples.
user
The output grid for the test input grid is:

```
Yellow Blue Black Brown
Brown Black Brown Yellow
Yellow Yellow Blue Brown
Yellow Yellow Yellow Brown
```
assistant