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:
Purple Orange Orange Gray Orange
Orange Purple Orange Purple Orange
Orange Purple Gray Orange Purple
Orange Purple Gray Gray Gray

Output:
Black Orange Orange Orange Purple
Black Purple Purple Purple Orange
Black Gray Gray Orange Orange
Black Gray Orange Purple Gray
Black Gray Purple Orange Orange


Example 2
Input:
Pink Gray Gray Pink
Gray Red Pink Gray
Pink Pink Gray Gray
Gray Gray Gray Red
Red Gray Gray Gray

Output:
Black Red Gray Pink
Black Gray Gray Pink
Black Gray Gray Gray
Black Gray Red Gray
Black Black Black Black
Black Black Black Black


Example 3
Input:
Brown Purple Pink Purple Pink
Brown Pink Purple Brown Brown
Brown Purple Brown Pink Pink
Pink Purple Pink Purple Purple
Brown Purple Pink Pink Purple

Output:
Black Brown Pink Brown Brown
Black Purple Purple Purple Pink
Black Pink Pink Brown Purple
Black Pink Purple Pink Brown
Black Purple Purple Pink Brown
Black Black Black Black Black


Here is the input grid for the test example:
Input:
Blue Yellow Yellow
Brown Yellow Brown
Yellow Brown Yellow


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:

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