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

Output:
Black Black Yellow Yellow Purple Black
Black Brown Brown Green Green Purple
Gray Gray Brown Brown Green Yellow
Black Red Red Brown Brown Yellow
Black Black Red Gray Brown Black
Black Black Black Gray Black Black


Example 2
Input:
Black Purple Blue Purple Black
Yellow Gray Blue Gray Yellow
Brown Blue Gray Blue Brown
Brown Brown Brown Brown Brown
Brown Brown Black Brown Brown

Output:
Black Yellow Brown Brown Brown
Purple Gray Blue Brown Brown
Blue Blue Gray Brown Black
Purple Gray Blue Brown Brown
Black Yellow Brown Brown Brown


Example 3
Input:
Yellow Purple Red Blue Red Purple Yellow
Blue Purple Red Red Red Purple Blue
Red Purple Blue Red Blue Purple Red
Black Black Blue Red Blue Black Black
Black Black Blue Black Blue Black Black

Output:
Yellow Blue Red Black Black
Purple Purple Purple Black Black
Red Red Blue Blue Blue
Blue Red Red Red Black
Red Red Blue Blue Blue
Purple Purple Purple Black Black
Yellow Blue Red Black Black


Here is the input grid for the test example:
Input:
Black Black Purple Black Purple Black Black
Black Orange Purple Purple Purple Orange Black
Black Orange Purple Purple Purple Orange Black
Blue Yellow Blue Black Blue Yellow Blue
Black Yellow Orange Orange Orange Yellow Black
Black Yellow Orange Orange Orange Yellow Black


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 Black Black Blue Black Black
Black Orange Orange Yellow Yellow Yellow
Purple Purple Purple Blue Orange Orange
Black Purple Purple Black Orange Orange
Purple Purple Purple Blue Orange Orange
Black Orange Orange Yellow Yellow Yellow
Black Black Black Blue Black Black
```
assistant