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

Output:
Purple Green Gray Brown
Purple Brown Gray Brown
Orange Brown Gray Brown
Orange Green Gray Brown


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

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


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

Output:
Purple Pink Pink
Purple Purple Pink
Purple Purple Pink


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


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:

```
Blue Blue Pink
Green Green Purple
Pink Pink Pink
Red Red Pink
```
assistant