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 Red Red Pink Gray
Red Red Brown Orange Orange
Gray Red Brown Orange Orange
Gray Gray Brown Orange Brown
Blue Yellow Orange Orange Brown
Gray Yellow Orange Blue Yellow
Red Yellow Red Pink Pink

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


Example 2
Input:
Yellow Yellow Green Green Yellow Yellow
Gray Gray Green Green Gray Gray
Purple Purple Purple Purple Purple Purple
Brown Orange Gray Gray Orange Brown
Green Green Gray Gray Green Green

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


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

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


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

```
Purple Blue Brown Red
Purple Pink Brown Red
Purple Pink Brown Red
Purple Blue Brown Red
```
assistant