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

Output:
Brown Yellow Red Orange Brown
Red Orange Pink Orange Brown
Red Red Brown Red Purple
Pink Pink Red Red Pink
Red Red Red Pink Orange


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

Output:
Brown Pink Orange Orange Pink Pink
Brown Brown Orange Orange Pink Pink
Red Orange Orange Yellow Brown Brown
Purple Purple Pink Purple Purple Purple
Orange Brown Pink Pink Orange Brown
Orange Pink Pink Pink Orange Orange


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

Output:
Brown Purple Purple Red Pink Pink
Brown Pink Yellow Pink Pink Pink
Pink Red Yellow Brown Brown Brown
Pink Yellow Yellow Orange Brown Purple
Pink Pink Brown Pink Orange Orange
Pink Pink Pink Red Red Orange


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


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:

```
Yellow Pink Purple Purple
Brown Yellow Brown Red
Brown Brown Brown Brown
Red Red Yellow Yellow
```
assistant