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

Output:
Gray Orange Orange Orange Orange Orange Gray
Orange Orange Red Orange Purple Orange Orange
Orange Orange Purple Blue Orange Blue Red
Orange Red Orange Red Orange Orange Orange
Orange Orange Purple Blue Orange Purple Orange


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

Output:
Orange Orange Red Orange Red
Orange Orange Orange Orange Orange
Orange Gray Purple Orange Red
Orange Orange Purple Blue Orange
Blue Orange Blue Orange Orange
Gray Gray Orange Orange Orange


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

Output:
Orange Red Orange Blue Gray Gray
Orange Orange Blue Red Orange Orange
Orange Gray Orange Purple Gray Orange
Orange Orange Orange Orange Orange Orange
Orange Blue Orange Orange Orange Purple
Orange Blue Blue Orange Orange Orange


Here is the input grid for the test example:
Input:
Black Black Black Gray
Black Gray Black Blue
Purple Black Orange Black
Black Pink Black 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:

```
Gray Orange Orange Orange
Blue Orange Gray Orange
Orange Purple Orange Orange
Blue Orange Gray Orange
```
assistant