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

Output:
Green Orange Orange Orange Orange Green
Orange Brown Green Green Brown Orange
Purple Gray Pink Pink Gray Purple
Yellow Pink Brown Brown Pink Yellow
Purple Orange Pink Pink Orange Purple


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

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


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

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


Here is the input grid for the test example:
Input:
Black Black Blue Brown
Black Black Gray Brown
Black Black Pink Green
Black Black 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 Blue Blue Brown
Brown Gray Gray Brown
Green Pink Pink Green
Pink Gray Gray Pink
```
assistant