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:
Yellow Brown Purple Gray Pink Orange Brown Green Green Green
Purple Pink Green Gray Blue Blue Blue Brown Yellow Green
Red Green Purple Green Blue Blue Orange Purple Yellow Purple
Orange Gray Green Blue Pink Blue Red Gray Gray Yellow
Orange Blue Blue Pink Green Blue Red Red Gray Gray
Green Blue Blue Blue Blue Blue Red Red Purple Brown
Orange Blue Orange Red Red Red Blue Red Blue Purple
Blue Brown Purple Gray Red Red Red Blue Brown Brown
Purple Yellow Yellow Gray Gray Purple Blue Brown Black Orange
Green Brown Orange Gray Orange Blue Pink Gray Purple Yellow

Output:
Yellow Purple Red Orange Pink Green Black Blue Black Green
Purple Black Black Black Black Black Black Black Black Brown
Red Black Black Black Black Black Black Black Black Orange
Orange Black Black Black Black Black Black Black Black Gray
Pink Black Black Black Black Black Black Black Black Gray
Green Black Black Black Black Black Black Black Black Blue
Black Black Black Black Black Black Black Black Black Pink
Blue Black Black Black Black Black Black Black Black Black
Black Black Black Black Black Black Black Black Black Purple
Green Brown Orange Gray Gray Blue Pink Black Purple Yellow


Example 2
Input:
Brown Blue Red Green Pink Blue Gray Red Yellow
Pink Black Purple Black Black Black Purple Black Yellow
Orange Purple Black Gray Black Gray Black Purple Orange
Blue Blue Purple Gray Red Gray Purple Blue Yellow
Orange Purple Red Pink Pink Pink Red Purple Blue
Brown Blue Green Purple Pink Purple Green Blue Purple
Pink Blue Blue Blue Brown Blue Blue Blue Purple
Green Green Green Purple Blue Purple Green Green Pink
Green Blue Purple Brown Gray Brown Brown Purple Orange

Output:
Brown Pink Red Blue Pink Black Gray Green Green
Pink Black Black Black Black Black Black Black Blue
Red Black Black Black Black Black Black Black Purple
Blue Black Black Black Black Black Black Black Brown
Pink Black Black Black Black Black Black Black Gray
Black Black Black Black Black Black Black Black Purple
Gray Black Black Black Black Black Black Black Black
Green Black Black Black Black Black Black Black Pink
Green Blue Purple Brown Gray Purple Black Pink Orange


Example 3
Input:
Blue Gray Green Pink Brown Gray Brown Blue Pink Gray Orange
Orange Black Black Black Blue Blue Black Black Black Black Blue
Orange Black Gray Black Orange Blue Black Gray Gray Black Orange
Pink Black Gray Gray Blue Gray Blue Gray Black Black Yellow
Gray Black Black Blue Gray Blue Gray Blue Orange Blue Purple
Blue Blue Blue Gray Blue Blue Blue Gray Blue Blue Green
Red Blue Orange Blue Gray Blue Gray Blue Black Black Gray
Pink Black Black Gray Blue Gray Blue Gray Gray Black Orange
Brown Black Gray Gray Black Blue Orange Black Gray Black Red
Red Black Black Black Black Blue Blue Black Black Black Pink
Purple Pink Brown Brown Orange Pink Pink Pink Purple Brown Green

Output:
Blue Orange Green Pink Gray Black Red Black Brown Black Purple
Orange Black Black Black Black Black Black Black Black Black Pink
Green Black Black Black Black Black Black Black Black Black Brown
Pink Black Black Black Black Black Black Black Black Black Yellow
Gray Black Black Black Black Black Black Black Black Black Orange
Black Black Black Black Black Black Black Black Black Black Green
Red Black Black Black Black Black Black Black Black Black Gray
Black Black Black Black Black Black Black Black Black Black Black
Brown Black Black Black Black Black Black Black Black Black Red
Black Black Black Black Black Black Black Black Black Black Pink
Purple Pink Brown Yellow Orange Green Gray Black Red Pink Green


Here is the input grid for the test example:
Input:
Brown Gray Yellow Pink Purple Pink Red
Red Brown Black Brown Brown Brown Red
Blue Brown Blue Black Blue Black Yellow
Orange Brown Black Blue Black Brown Green
Gray Black Blue Black Blue Brown Green
Brown Brown Brown Brown Black Brown Green
Yellow Yellow Green Blue Green Gray Pink


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:

```
Brown Red Blue Orange Gray Black Yellow
Red Black Black Black Black Black Black
Blue Black Black Black Black Black Green
Orange Black Black Black Black Black Blue
Gray Black Black Black Black Black Black
Black Black Black Black Black Black Gray
Yellow Black Green Blue Black Gray Pink
```
assistant