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:
Purple Yellow Blue Brown
Brown Blue Yellow Purple
Purple Brown Yellow Blue
Yellow Blue Purple Brown

Output:
Brown Yellow Blue Purple
Purple Blue Yellow Brown
Blue Brown Yellow Purple
Brown Blue Purple Yellow


Example 2
Input:
Orange Green Purple Pink
Purple Pink Green Orange
Pink Purple Orange Green
Pink Orange Green Purple
Green Purple Orange Pink

Output:
Pink Green Purple Orange
Orange Pink Green Purple
Green Purple Orange Pink
Purple Orange Green Pink
Pink Purple Orange Green


Example 3
Input:
Blue Green Gray Pink
Green Gray Pink Blue
Pink Gray Green Blue
Gray Green Blue Pink
Blue Pink Gray Green

Output:
Pink Green Gray Blue
Blue Gray Pink Green
Blue Gray Green Pink
Pink Green Blue Gray
Green Pink Gray Blue


Here is the input grid for the test example:
Input:
Red Gray Purple Brown
Brown Gray Red Purple
Red Purple Brown Gray


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:

```
Brown Gray Purple Red
Purple Gray Red Brown
Gray Purple Brown Red
```
assistant