**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
import java.util.*;

public class Main {

    static HashMap<Character, Character> BackSlashmap = new HashMap<>();
    static HashMap<Character, Character> FrontSlashmap = new HashMap<>();
    static HashMap<Character, int[]> direction = new HashMap<>();
    static String parent = "";
    static String ans="";
    static int ansCount=0;

    public static void main(String[] args) {
        // Initialize maps inside the main method
        BackSlashmap.put('N', 'E');
        BackSlashmap.put('W', 'S');
        BackSlashmap.put('S', 'W');
        BackSlashmap.put('E', 'N');

        FrontSlashmap.put('S', 'E');
        FrontSlashmap.put('W', 'N');
        FrontSlashmap.put('N', 'W');
        FrontSlashmap.put('E', 'S');

        direction.put('S', new int[]{1, 0});
        direction.put('N', new int[]{-1, 0});
        direction.put('W', new int[]{0, -1});
        direction.put('E', new int[]{0, 1});

        // Read input from scanner
        Scanner scanner = new Scanner(System.in);
        String firstLineInput = scanner.nextLine();
       // System.out.println("Enter the values");
        int row = Integer.parseInt(firstLineInput.split(" ")[0]);
        int col = Integer.parseInt(firstLineInput.split(" ")[1]);

        char[][] arr = new char[row][col];

        HashSet<String> h = new HashSet<>();
        //System.out.println("Enter the values");
        // Populate the grid and hash set with positions of '/' and '\'
        for (int i = 0; i < row; i++) {
            String rowLine = scanner.nextLine();
            int k = 0;
            for (char c : rowLine.toCharArray()) {
                arr[i][k] = c;
                if (c == '/' || c == '\\') {
                    h.add(i + ":" + k);
                }
                k++;
            }
        }

        // for(char[] rows:arr) {
        // 	System.out.println(Arrays.toString(rows));
        // }

        // Call recurse for the four directions
        for (int i = 0; i < col; i++) {
            parent = "N" + (i + 1);
            recurse(arr, h, 0, i, 'S');
        }
        for (int i = 0; i < col; i++) {
            parent = "S" + (i + 1);
            recurse(arr, h, arr.length - 1, i, 'N');
        }
        for (int i = 0; i < row; i++) {
            parent = "W" + (i + 1);
            recurse(arr, h, i, 0, 'E');
        }
        for (int i = 0; i < row; i++) {
            parent = "E" + (i + 1);
            recurse(arr, h, i, arr[0].length - 1, 'W');
        }

        if(ansCount>0){
            System.out.println(ansCount);
            System.out.print(ans.trim());
        }
    }

    public static void recurse(char[][] arr, HashSet<String> h, int i, int j, char d){

        if(h.size()==0){
            ans+=parent;ansCount+=1;
            ans+=" ";
            return;
        }

        if(i<0 || j<0 || i>=arr.length || j>=arr[0].length){
            return;
        }

        if(arr[i][j]=='.'){
            int[] dir=direction.get(d);
            recurse(arr,h,i+dir[0],j+dir[1],d);
        }
        else if(arr[i][j]=='/'){
            char newD=BackSlashmap.get(d);
            int[] dir=direction.get(newD);
            String removable=String.valueOf(i)+":"+
                    String.valueOf(j);
            if(h.contains(removable)){
                h.remove(removable);
            }

            recurse(arr,h,i+dir[0],j+dir[1],newD);

            h.add(removable);

        }
        else if(arr[i][j]=='\\'){
            char newD=FrontSlashmap.get(d);
            int[] dir=direction.get(newD);
            String removable=String.valueOf(i)+":"+
                    String.valueOf(j);
            if(h.contains(removable)){
                h.remove(removable);
            }

            recurse(arr,h,i+dir[0],j+dir[1],newD);

            h.add(removable);

        }

    }

}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
3 3
/./
./.
/./
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define llu long long unsigned
#define INF 0x3f3f3f3f
#define for1(a, b, c) for(int (a) = (b); (a) <= (c); (a)++)
#define for2(a, b, c) for(int (a) = (b); (a) >= (c); (a)--)
const int MAXN=2e2+10;

int mp[MAXN][MAXN];
bool vis[MAXN][MAXN],pass[MAXN][4];
int dx[4]={-1,0,1,0};
int dy[4]={0,1,0,-1};
char dir[4]={'S','W','N','E'};
int cnt,tot=0;
int ed,ep;
int n,m;

inline int mod4(int x){
	return (x+4)%4;
}

void dfs(int x,int y,int d){
	if(x==0||y==0||x>n||y>m){
		if(x==0||x>n){
			ep=y;
		}else{
			ep=x;
		}
		ed=mod4(d-2);
		return;
	}
	if(mp[x][y]==0) {dfs(x+dx[d],y+dy[d],d);return;}
	if(!vis[x][y]){
		vis[x][y]=1;
		cnt++;
	}
	if(d%2){
		d = mod4(d-mp[x][y]);
	}else{
		d = mod4(d+mp[x][y]);
	}
	dfs(x+dx[d],y+dy[d],d);
}

void show(int d,int x){
	cout<<dir[d]<<x<<' ';
}

int main(){
	ios::sync_with_stdio(0);
	cin>>n>>m;
	for1(i,1,n){
		string s;
		cin>>s;
		for1(j,1,m){
			if(s[j-1]=='/'){
				mp[i][j]=1;
				tot++;
			}else if(s[j-1]=='\\'){
				mp[i][j]=-1;
				tot++;
			}
		}
	}
	if(tot==1){
		cout<<4<<endl;
		for1(i,1,n){
			for1(j,1,m){
				if(mp[i][j]!=0){
					show(0,j);
					show(1,i);
					show(2,j);
					show(3,i);
					return 0;
				}
			}
		}
	}
	for1(d,0,1){
		for1(i,1,n){
			if(!pass[i][d*2]){
				memset(vis,0,sizeof(vis));
				cnt=0;
				dfs((1-d)*(n-1)+1,i,d*2);
				if(cnt==tot){
					cout<<2<<endl;
					show(d*2,i);
					show(ed,ep);
					cout<<endl;
					return 0;
				}
			}
		}
		for1(i,1,m){
			if(!pass[i][d*2+1]){
				memset(vis,0,sizeof(vis));
				cnt=0;
				dfs(i,d*(n-1)+1,d*2+1);
				if(cnt==tot){
					cout<<2<<endl;
					show(d*2+1,i);
					show(ed,ep);
					cout<<endl;
					return 0;
				}
			}
		}
	}
	cout<<0<<endl;
	return 0;
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
3 3
/\/
\//
/\/
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define llu long long unsigned
#define INF 0x3f3f3f3f
#define for1(a, b, c) for(int (a) = (b); (a) <= (c); (a)++)
#define for2(a, b, c) for(int (a) = (b); (a) >= (c); (a)--)
const int MAXN=2e2+10;

int mp[MAXN][MAXN];
bool vis[MAXN][MAXN],pass[MAXN][4];
int dx[4]={-1,0,1,0};
int dy[4]={0,1,0,-1};
char dir[4]={'S','W','N','E'};
int cnt,tot=0;
int ed,ep;
int n,m;

// int counter=0;

inline int mod4(int x){
	return (x+4)%4;
}

void dfs(int x,int y,int d){
	if(x==0||y==0||x>n||y>m){
		if(x==0||x>n){
			ep=y;
			pass[y][mod4(d-2)]=1;
		}else{
			ep=x;
			pass[x][mod4(d-2)]=1;
		}
		ed=mod4(d-2);
		return;
	}
	if(mp[x][y]==0) {dfs(x+dx[d],y+dy[d],d);return;}
	if(!vis[x][y]){
		vis[x][y]=1;
		cnt++;
	}
	if(d%2){
		d = mod4(d-mp[x][y]);
	}else{
		d = mod4(d+mp[x][y]);
	}
	dfs(x+dx[d],y+dy[d],d);
}

void show(int d,int x){
	cout<<dir[d]<<x<<' ';
}

int main(){
	ios::sync_with_stdio(0);
	cin>>n>>m;
	for1(i,1,n){
		string s;
		cin>>s;
		for1(j,1,m){
			if(s[j-1]=='/'){
				mp[i][j]=1;
				tot++;
			}else if(s[j-1]=='\\'){
				mp[i][j]=-1;
				tot++;
			}
		}
	}
	if(tot==1){
		cout<<4<<endl;
		for1(i,1,n){
			for1(j,1,m){
				if(mp[i][j]!=0){
					show(0,j);
					show(1,i);
					show(2,j);
					show(3,i);
					return 0;
				}
			}
		}
	}
	for1(d,0,1){
		for1(i,1,m){
			if(!pass[i][d*2]){
				memset(vis,0,sizeof(vis));
				// counter++;
				cnt=0;
				dfs((1-d)*(n-1)+1,i,d*2);
				if(cnt==tot){
					cout<<2<<endl;
					// cout<<counter<<endl;
					show(ed,ep);
					show(d*2,i);
					cout<<endl;
					return 0;
				}
			}
		}
		for1(i,1,n){
			if(!pass[i][d*2+1]){
				memset(vis,0,sizeof(vis));
				cnt=0;
				// counter++;
				dfs(i,d*(n-1)+1,d*2+1);
				if(cnt==tot){
					cout<<2<<endl;
					// cout<<counter<<endl;
					show(ed,ep);
					show(d*2+1,i);
					cout<<endl;
					return 0;
				}
			}
		}
	}
	cout<<0<<endl;
	return 0;
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
3 3
/..
...\
.\\
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
# Src : Vux2Code
import math

t = 1

# dir : UDLR (Up to down, Down to up, Left to right, Right to left)

siz = 100000
n, m = 0, 0
a = [''] * siz
f = [False] * siz

def geta (row, col) : return a [row * m + col]
def seta (row, col, val) : a [row * m + col] = val

def getf (row, col) : return f [row * m + col]
def setf (row, col, val) : f [row * m + col] = val

def nextCell (i, j, dir) :
    if   dir == 0 : return (i + 1, j)
    elif dir == 1 : return (i - 1, j)
    elif dir == 2 : return (i, j + 1)
    else          : return (i, j - 1)

def turn (i, j, dir) :
    if geta (i, j) == '.' : return dir
    elif geta (i, j) == '\\' :
        if dir == 0 : return 2
        elif dir == 1 : return 3
        elif dir == 2 : return 0
        elif dir == 3 : return 1
    else :
        if dir == 0 : return 3
        elif dir == 1 : return 2
        elif dir == 2 : return 1
        elif dir == 3 : return 0

def inBoard (i, j) :
    return 0 < i < n and 0 < j < m

def fin (i, j, dir) :
    if inBoard (i, j) :
        setf (i, j, True)
        nextTurn = turn (i, j, dir)
        cell = nextCell (i, j, nextTurn)
        fin (cell [0], cell [1], nextTurn)

def check () :
    ans = True
    for i in range (1, n) :
        for j in range (1, m) :
            if geta (i, j) != '.' :
                if getf (i, j) == False :
                    ans = False
            setf (i, j, False)
    return ans

def solve () :
    global n, m
    tmp = input ()
    arrTmp = [int (i) for i in tmp. split ()]
    n = arrTmp [0] + 1
    m = arrTmp [1] + 1
    for i in range (1, n) :
        tmp = input ()
        for j in range (1, m) :
            seta (i, j, tmp [j - 1])
    s = set ()
    for i in range (1, m) :
        fin (1, i, 0)
        if check () : s. add ("N" + str (i))
        fin (n - 1, i, 1)
        if check () : s. add ("S" + str (i))
    for i in range (1, n) :
        fin (i, 1, 2)
        if check () : s. add ("W" + str (i))
        fin (i, m - 1, 3)
        if check () : s. add ("E" + str (i))
    print (len (s))
    for i in s : print (i, end = ' ')

# t = int (input ())
for _ in range (t) : solve ()

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
4 4
/\\\
//\\
\\///
\\///
```

### Explanation:
This test case is designed to expose potential bugs in the algorithm by creating a scenario where the beam of light must navigate through a complex pattern of mirrors. The grid is small (4x4) but contains a dense arrangement of mirrors that require careful tracking of the beam's path to ensure all mirrors are hit.

- The first row contains a mirror that will reflect the beam in a way that it must hit all the mirrors in the grid.
- The second row contains a pattern that could potentially mislead the algorithm if it does not correctly handle the reflections.
- The third and fourth rows contain a mix of mirrors that need to be hit in a specific sequence for the beam to cover all mirrors.

This configuration is likely to challenge the algorithm's ability to correctly trace the beam's path and determine the valid starting points for the laser.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
r, c = map(int, input().split())
maze = [list(input()) for _ in range(r)]

mirrors = []
for i in range(r):
    for j in range(c):
        if maze[i][j] == '/' or maze[i][j] == '\\':
            mirrors.append((i, j))

one_directions = [(1, 0), (-1, 0), (0, -1), (0, 1)]
two_directions = [(0, 1), (0, -1), (1, 0), (-1, 0)]

left_border = [(i, 0) for i in range(r)]
right_border = [(i, c - 1) for i in range(r)]
top_border = [(0, i) for i in range(c)]
bottom_border = [(r - 1, i) for i in range(c)]

res = []

for cell in left_border:
    mirrors_copy = mirrors.copy()
    direction = (0, 1)
    x, y = cell
    while 0 <= x < r and 0 <= y < c and mirrors_copy:
        if maze[x][y] == '/':
            idx = one_directions.index(direction)
            direction = one_directions[(idx + 2) % 4]
            if (x, y) in mirrors_copy:
                mirrors_copy.remove((x, y))
        elif maze[x][y] == '\\':
            idx = two_directions.index(direction)
            direction = two_directions[(idx + 2) % 4]
            if (x, y) in mirrors_copy:
                mirrors_copy.remove((x, y))
        x += direction[0]
        y += direction[1]
    if not mirrors_copy:
        res.append(f'W{cell[0] + 1}')

for cell in right_border:
    mirrors_copy = mirrors.copy()
    direction = (0, -1)
    x, y = cell
    while 0 <= x < r and 0 <= y < c and mirrors_copy:
        if maze[x][y] == '/':
            idx = one_directions.index(direction)
            direction = one_directions[(idx + 2) % 4]
            if (x, y) in mirrors_copy:
                mirrors_copy.remove((x, y))
        elif maze[x][y] == '\\':
            idx = two_directions.index(direction)
            direction = two_directions[(idx + 2) % 4]
            if (x, y) in mirrors_copy:
                mirrors_copy.remove((x, y))
        x += direction[0]
        y += direction[1]
    if not mirrors_copy:
        res.append(f'E{cell[0] + 1}')

for cell in top_border:
    mirrors_copy = mirrors.copy()
    direction = (1, 0)
    x, y = cell
    while 0 <= x < r and 0 <= y < c and mirrors_copy:
        if maze[x][y] == '/':
            idx = one_directions.index(direction)
            direction = one_directions[(idx + 2) % 4]
            if (x, y) in mirrors_copy:
                mirrors_copy.remove((x, y))
        elif maze[x][y] == '\\':
            idx = two_directions.index(direction)
            direction = two_directions[(idx + 2) % 4]
            if (x, y) in mirrors_copy:
                mirrors_copy.remove((x, y))
        x += direction[0]
        y += direction[1]
    if not mirrors_copy:
        res.append(f'N{cell[1] + 1}')

for cell in bottom_border:
    mirrors_copy = mirrors.copy()
    direction = (-1, 0)
    x, y = cell
    while 0 <= x < r and 0 <= y < c and mirrors_copy:
        if maze[x][y] == '/':
            idx = one_directions.index(direction)
            direction = one_directions[(idx + 2) % 4]
            if (x, y) in mirrors_copy:
                mirrors_copy.remove((x, y))
        elif maze[x][y] == '\\':
            idx = two_directions.index(direction)
            direction = two_directions[(idx + 2) % 4]
            if (x, y) in mirrors_copy:
                mirrors_copy.remove((x, y))
        x += direction[0]
        y += direction[1]
    if not mirrors_copy:
        res.append(f'S{cell[1] + 1}')

if not res:
    print('0')

else:
    print(len(res))
    for cell in res:
        print(cell, end=' ')

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
To generate a test input that exposes the bug in the given buggy code, we need to focus on edge cases and scenarios that might cause the algorithm to fail. Here are some potential issues to consider:

1. **Single Mirror**: The algorithm might fail if there is only one mirror in the grid.
2. **Mirrors in a Straight Line**: The algorithm might fail if all mirrors are aligned in a straight line.
3. **Mirrors in a Complex Configuration**: The algorithm might fail if the mirrors are arranged in a complex configuration that requires precise reflection angles.
4. **No Mirrors in the Path**: The algorithm might fail if the laser path does not intersect with any mirrors.

Given these considerations, let's create a small-scale test input that maximizes the failure probability:

### Test Input:
```plaintext
4 4
/...
.../
./..
..\\
```

### Explanation:
- The grid is 4x4, which is small enough to be manageable.
- There are mirrors in the grid, but they are not aligned in a straightforward manner.
- The mirrors are positioned in such a way that the laser beam must reflect multiple times to hit all mirrors.

This input should help identify if the algorithm correctly handles the reflection and pathing through the grid. If the algorithm fails to hit all mirrors or incorrectly identifies the laser positions, this test input will expose the bug.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
import java.io.*;
import java.util.*;

public class alpha{
    static FastReader sc = new FastReader();
    static StringBuilder print ;
    public static void main (String[] args) throws java.lang.Exception{
        int num = 1;
        while(num-->0){
            print = new StringBuilder();
            solve();
            System.out.print(print);
        }
    }
    static  int po;
    private static void solve() {
        int n = sc.nextInt();
        int m = sc.nextInt();
        char[][] arr = new char[n][m];

        int l =0;
        for(int i =0 ;i < n;i++){
            arr[i] = sc.next().toCharArray();
            for(int j =0;j<arr[i].length;j++){
                if(arr[i][j]!='.' ){
                    l++;
                }
            }
        }
        Queue<String> q = new LinkedList<>();
        for(int i =0 ;i < n;i++){
            po=l;
            if(fkn(i,0,'>',arr) ){
                q.add("W"+(i+1) );
            }
        }
        for(int i =0 ;i < n;i++){
            po=l;
            if(fkn(i,m-1,'<',arr) ){
                q.add("E"+(i+1) );
            }
        }
        for(int i =0 ;i < m;i++){
            po=l;
            if(fkn(0,i,'v',arr) ){
                q.add("N"+(i+1) );
            }
        }

        for(int i =0 ;i < n;i++){
            po=l;
            if(fkn(n-1,i,'^',arr) ){
                q.add("S"+(i+1) );
            }
        }
        print.append(q.size()).append("\n");
        if(!q.isEmpty()){
            while (!q.isEmpty()){
                print.append(q.poll()).append(" ");
            }
            print.append("\n");
        }

        return;

    }

    private static boolean fkn(int i, int y, char z, char[][] arr) {
        HashSet<String> set = new HashSet<>();
        t p = new t(i,y,z);
        while(true){
            String x = p.x+" "+p.y+" "+p.z;
            if(p.x <0 || p.y<0 || p.x==arr.length || p.y==arr[0].length || set.contains(x)){
                return false;
            }
            set.add(x);
            if(arr[p.x][p.y]=='.'){
                if(p.z=='>'){
                    p.y++;
                }else if(p.z=='<'){
                    p.y--;
                }else if(p.z=='^'){
                    p.x--;
                }else{
                    p.x++;
                }
            }else if(arr[p.x][p.y]=='/'){
                po--;
                if(p.z=='>'){
                    p.x--;
                    p.z='^';
                }else if(p.z=='<'){
                    p.x++;
                    p.z='v';
                }else if(p.z=='^'){
                    p.y++;
                    p.z='>';
                }else{
                    p.y--;
                    p.z='<';
                }
            }else{
                po--;
                if(p.z=='>'){
                    p.x++;
                    p.z='v';
                }else if(p.z=='<'){
                    p.x--;
                    p.z='^';
                }else if(p.z=='^'){
                    p.y--;
                    p.z='<';
                }else{
                    p.y++;
                    p.z='>';
                }
            }
            if(po==0){
                return true;
            }
        }
    }

    private static void solve(int[] arr) {

    }

    private static void input(int[] arr) {
        int n = arr.length;
        for(int i =0 ; i< n;i++){
            arr[i] = sc.nextInt();
        }
    }
}
class t{
    int x;
    int y;
    char z;
    t(int a,int b,char c){
        x=a;
        y=b;
        z=c;
    }
}
//--------------------------------------------------------------------------------------

class pair implements Comparable<pair>{
    int x;
    int y;
    pair(int i,int j){
        x=i;
        y=j;
    }
    public boolean equals(Object o) {
        if (o instanceof pair) {
            pair p = (pair)o;
            return p.x == x && p.y == y;
        }
        return false;
    }
    public int hashCode() {
        return Integer.valueOf(x).hashCode() * 31 + Integer.valueOf(y).hashCode();

    }
    // @Override
    public int compareTo(pair p) {
        int a = Integer.compare(x, p.x);
        if(a==0){
            return Integer.compare(y, p.y);
        }
        return a;
    }
}
//=============================================================================

class FastReader{
    BufferedReader br;
    StringTokenizer st;
    public FastReader(){
        br = new BufferedReader(new
                InputStreamReader(System.in));
    }
    String next(){
        while (st == null || !st.hasMoreElements()){
            try{
                st = new StringTokenizer(br.readLine());
            }catch (IOException e){
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }
    int nextInt(){
        return Integer.parseInt(next());
    }
    long nextLong(){
        return Long.parseLong(next());
    }
    double nextDouble(){
        return Double.parseDouble(next());
    }
    String nextLine(){
        String str = "";
        try{
            str = br.readLine();
        }
        catch (IOException e){
            e.printStackTrace();
        }
        return str;
    }
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
To generate a challenging test input that exposes the bug in the provided code, we need to consider edge cases and scenarios where the algorithm might fail. Here are the steps to think through this:

1. **Edge Cases:**
   - Empty grid.
   - Grid with only one mirror.
   - Grid where mirrors are arranged in a way that makes it impossible for a single laser to hit all mirrors.

2. **Complex Reflections:**
   - Grid where mirrors are arranged in a way that requires multiple reflections to hit all mirrors.
   - Grid where mirrors are arranged in a loop, causing the laser to get stuck in a cycle.

3. **Boundary Conditions:**
   - Grid where the laser needs to enter from a specific side to hit all mirrors.

Given these considerations, let's create a small-scale test input that is likely to expose the bug:

### Test Input 1: Impossible Configuration
A grid where the mirrors are arranged in such a way that it is impossible for a single laser to hit all mirrors.

```plaintext
4 4
/\\/
\\///
/\\/
\\///
```

### Explanation:
- This grid has mirrors arranged in a way that creates a cycle. The laser will get stuck in the cycle and will not be able to hit all mirrors.

### Test Input 2: Single Mirror
A grid with only one mirror.

```plaintext
4 4
....
....
/...
....
```

### Explanation:
- This grid has only one mirror, which is relatively simple but can still expose issues in the algorithm if it is not correctly handling single mirrors.

### Test Input 3: Complex Reflections
A grid where mirrors are arranged in a way that requires multiple reflections to hit all mirrors.

```plaintext
4 4
/\\/
/\\/
/\\/
/\\/
```

### Explanation:
- This grid has mirrors arranged in a way that requires the laser to reflect multiple times to hit all mirrors. This can test the algorithm's ability to handle complex reflection paths.

### Test Input 4: Boundary Conditions
A grid where the laser needs to enter from a specific side to hit all mirrors.

```plaintext
4 4
/\\/
/\\/
/\\/
/\\/
```

### Explanation:
- This grid is similar to the previous one but can test the algorithm's ability to correctly determine the required entry point for the laser.

### Chosen Test Input:
For simplicity and to ensure it is a valid and small-scale test input, let's use the first one:

```plaintext
4 4
/\\/
\\///
/\\/
\\///
```

This input should expose the bug in the provided code by creating a cycle that the laser cannot escape from.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
import java.io.*;
import java.util.*;

public class alpha{
    static FastReader sc = new FastReader();
    static StringBuilder print ;
    public static void main (String[] args) throws java.lang.Exception{
        int num = 1;
        while(num-->0){
            print = new StringBuilder();
            solve();
            System.out.print(print);
        }
    }
    static  int po;
    private static void solve() {
        int n = sc.nextInt();
        int m = sc.nextInt();
        char[][] arr = new char[n][m];
        if(n==85 && m==74){
            print.append("-1");
            return;
        }
        int l =0;
        for(int i =0 ;i < n;i++){
            arr[i] = sc.next().toCharArray();
            for(int j =0;j<arr[i].length;j++){
                if(arr[i][j]!='.' ){
                    l++;
                }
            }
        }
        Queue<String> q = new LinkedList<>();
        for(int i =0 ;i < n;i++){
            po=l;
            if(fkn(i,0,'>',arr) ){
                q.add("W"+(i+1) );
            }
        }
        for(int i =0 ;i < n;i++){
            po=l;
            if(fkn(i,m-1,'<',arr) ){
                q.add("E"+(i+1) );
            }
        }
        for(int i =0 ;i < m;i++){
            po=l;
            if(fkn(0,i,'v',arr) ){
                q.add("N"+(i+1) );
            }
        }

        for(int i =0 ;i < n;i++){
            po=l;
            if(fkn(n-1,i,'^',arr) ){
                q.add("S"+(i+1) );
            }
        }
        print.append(q.size()).append("\n");
        if(!q.isEmpty()){
            while (!q.isEmpty()){
                print.append(q.poll()).append(" ");
            }
            print.append("\n");
        }

        return;

    }

    private static boolean fkn(int i, int y, char z, char[][] arr) {
        HashSet<String> set = new HashSet<>();
        t p = new t(i,y,z);
        while(true){
            String x = p.x+" "+p.y+" "+p.z;
            if(p.x <0 || p.y<0 || p.x==arr.length || p.y==arr[0].length || set.contains(x)){
                return false;
            }
            set.add(x);
            if(arr[p.x][p.y]=='.'){
                if(p.z=='>'){
                    p.y++;
                }else if(p.z=='<'){
                    p.y--;
                }else if(p.z=='^'){
                    p.x--;
                }else{
                    p.x++;
                }
            }else if(arr[p.x][p.y]=='/'){
                po--;
                if(p.z=='>'){
                    p.x--;
                    p.z='^';
                }else if(p.z=='<'){
                    p.x++;
                    p.z='v';
                }else if(p.z=='^'){
                    p.y++;
                    p.z='>';
                }else{
                    p.y--;
                    p.z='<';
                }
            }else{
                po--;
                if(p.z=='>'){
                    p.x++;
                    p.z='v';
                }else if(p.z=='<'){
                    p.x--;
                    p.z='^';
                }else if(p.z=='^'){
                    p.y--;
                    p.z='<';
                }else{
                    p.y++;
                    p.z='>';
                }
            }
            if(po==0){
                return true;
            }
        }
    }

    private static void solve(int[] arr) {

    }

    private static void input(int[] arr) {
        int n = arr.length;
        for(int i =0 ; i< n;i++){
            arr[i] = sc.nextInt();
        }
    }
}
class t{
    int x;
    int y;
    char z;
    t(int a,int b,char c){
        x=a;
        y=b;
        z=c;
    }
}
//--------------------------------------------------------------------------------------

class pair implements Comparable<pair>{
    int x;
    int y;
    pair(int i,int j){
        x=i;
        y=j;
    }
    public boolean equals(Object o) {
        if (o instanceof pair) {
            pair p = (pair)o;
            return p.x == x && p.y == y;
        }
        return false;
    }
    public int hashCode() {
        return Integer.valueOf(x).hashCode() * 31 + Integer.valueOf(y).hashCode();

    }
    // @Override
    public int compareTo(pair p) {
        int a = Integer.compare(x, p.x);
        if(a==0){
            return Integer.compare(y, p.y);
        }
        return a;
    }
}
//=============================================================================

class FastReader{
    BufferedReader br;
    StringTokenizer st;
    public FastReader(){
        br = new BufferedReader(new
                InputStreamReader(System.in));
    }
    String next(){
        while (st == null || !st.hasMoreElements()){
            try{
                st = new StringTokenizer(br.readLine());
            }catch (IOException e){
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }
    int nextInt(){
        return Integer.parseInt(next());
    }
    long nextLong(){
        return Long.parseLong(next());
    }
    double nextDouble(){
        return Double.parseDouble(next());
    }
    String nextLine(){
        String str = "";
        try{
            str = br.readLine();
        }
        catch (IOException e){
            e.printStackTrace();
        }
        return str;
    }
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
3 3
/..
...\
.//
```

### Explanation:
This test input is designed to challenge the buggy code by creating a grid that requires careful handling of mirror reflections and the counting of mirrors. Here’s a breakdown:

1. **Grid Layout:**
   - The grid is 3x3, which is small enough to be manageable but large enough to contain a variety of mirror placements.
   - The mirrors are placed in such a way that the path of the laser beam must be carefully traced to ensure all mirrors are hit.

2. **Mirror Placement:**
   - The first row contains a type 1 mirror ( `/` ) at (1,1).
   - The second row contains a type 2 mirror ( `\` ) at (2,3).
   - The third row contains a type 1 mirror ( `/` ) at (3,2).

3. **Expected Behavior:**
   - The laser must start from a position that allows it to hit all mirrors. This requires the laser to reflect off the mirrors in a specific sequence.
   - The correct solution should find the valid starting positions for the laser.

4. **Challenges:**
   - The test input ensures that the laser must navigate through a non-trivial path to hit all mirrors.
   - The placement of mirrors in different rows and columns requires the algorithm to handle reflections correctly and count the mirrors accurately.

This input should expose any issues in the buggy code, particularly in the reflection logic and the counting of mirrors.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
#include<bits/stdc++.h>
using namespace std;

//#define int long long
typedef long long ll;
typedef vector<long long> vll;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef stack<int> sti;
typedef queue<int> qi;
typedef vector<pair<long, long> > vpll;

#define endl "\n"
#define Ft front
#define Bk back
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define rep(i,a,b) for (int i = a; i <= b; i++)

void solve() {
    int n;
    int m;
    cin>>n>>m;
    int tm = 0;
    vvi grid(n, vi(m));
    string s;
    for(int i = 0;i < n; i++){
        cin>>s;
        for(int j = 0; j < m; j++){
            if(s[j] == '.'){
                grid[i][j] = 0;
                continue;
            }
            if(s[j] == '/')grid[i][j] = 2;
            if(s[j] == '\\')grid[i][j] = 1;
            tm++;
        }
    }
    map<int,vector<pair<int,int>>>mp;
    mp[1].emplace_back(0, 2);
    mp[1].emplace_back(1, 3);
    mp[1].emplace_back(2, 0);
    mp[1].emplace_back(3, 1);

    mp[2].emplace_back(0,1);
    mp[2].emplace_back(1,0);
    mp[2].emplace_back(2,3);
    mp[2].emplace_back(3,2);
    vector<string>ans;

    vector<pair<int,int>> move = {{-1, 0},{0, 1},{0, - 1},{1, 0}};
    //North
    int lastans = 0;
    int dir = 0;
    for(int i = 0;i < m; i++){
        int r, c;
        dir = 3;
        int count = 0;
        r = 0, c = i;
        vvi vis(n, vi(m, 0));
        while(r >= 0 && r < n && c >= 0 && c < m){
            if(grid[r][c] != 0){
                dir = mp[grid[r][c]][dir].second;
                if(vis[r][c] == 0){
                    vis[r][c] = 1;
                    count++;
                }
            }
            r += move[dir].first;
            c += move[dir].second;
        }
        if(count == tm){
            string z = "N";
            z += '1' + i;
            ans.push_back(z);
            lastans++;
        }
    }
    //south
    for(int i = 0;i < m; i++){
        int r, c;
        dir = 0;
        int count = 0;
        r = n - 1, c = i;
        vvi vis(n, vi(m, 0));
        while(r >= 0 && r < n && c >= 0 && c < m){
            if(grid[r][c] != 0){
                dir = mp[grid[r][c]][dir].second;
                if(vis[r][c] == 0){
                    vis[r][c] = 1;
                    count++;
                }
            }
            r += move[dir].first;
            c += move[dir].second;
        }
        if(count == tm){
            string z = "S";
            z += '1' + i;
            ans.push_back(z);
            lastans++;
        }
    }
    //west
    for(int i = 0;i < m; i++){
        int r, c;
        dir = 1;
        int count = 0;
        r = i, c = 0;
        vvi vis(n, vi(m, 0));
        while(r >= 0 && r < n && c >= 0 && c < m){
            if(grid[r][c] != 0){
                dir = mp[grid[r][c]][dir].second;
                if(vis[r][c] == 0){
                    vis[r][c] = 1;
                    count++;
                }
            }
            r += move[dir].first;
            c += move[dir].second;
        }
        if(count == tm){
            string z = "W";
            z += '1' + i;
            ans.push_back(z);
            lastans++;
        }
    }
    //east
    for(int i = 0; i < m; i++){
        int r, c;
        dir = 2;
        int count = 0;
        r = i, c = m - 1;
        vvi vis(n, vi(m, 0));
        while(r >= 0 && r < n && c >= 0 && c < m){
            if(grid[r][c] != 0){
                dir = mp[grid[r][c]][dir].second;
                if(vis[r][c] == 0){
                    vis[r][c] = 1;
                    count++;
                }
            }
            r += move[dir].first;
            c += move[dir].second;
        }
        if(count == tm){
            string z = "E";
            z += '1' + i;
            ans.push_back(z);
            lastans++;
        }
    }
    cout<<lastans<<endl;
    for(auto it: ans){
        cout<<it<<" ";
    }
    cout<<endl;
//    cout<<count<<endl;

}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    solve();
    return 0;
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
To generate a challenging test input that exposes the bug in the given buggy code, we need to focus on edge cases and scenarios that can cause the code to fail. Here are the steps to think through this:

1. **Identify Potential Bugs:**
   - The code might fail if it doesn't handle the directions and reflections correctly.
   - It might not correctly count the number of mirrors hit.
   - It might not handle the grid boundaries properly.

2. **Create a Test Case:**
   - Use a small grid to make the test case manageable and easy to verify.
   - Include a mix of mirrors and empty cells to test different reflection scenarios.
   - Ensure that the test case has a clear expected output to verify the correctness.

3. **Test Case:**
   - A grid with a small number of mirrors that can be hit from multiple sides.
   - Ensure that the mirrors are positioned in such a way that the laser can hit all of them from specific positions but not from others.

Let's create a test case with a 4x4 grid:

```plaintext
4 4
/./.
.\\.
/\/.
....
```

### Explanation:
- **Grid Layout:**
  - (1,1) = '/'
  - (1,2) = '.'
  - (1,3) = '/'
  - (1,4) = '.'
  - (2,1) = '.'
  - (2,2) = '\\'
  - (2,3) = '\\'
  - (2,4) = '.'
  - (3,1) = '/'
  - (3,2) = '/'
  - (3,3) = '\\'
  - (3,4) = '.'
  - (4,1) = '.'
  - (4,2) = '.'
  - (4,3) = '.'
  - (4,4) = '.'

- **Expected Output:**
  - The laser can hit all mirrors from the following positions:
    - From the north side at column 2: `N2`
    - From the west side at row 1: `W1`

This test case is designed to challenge the code by requiring it to correctly handle the reflections and count the number of mirrors hit from different directions.

### Final Test Case:
```plaintext
4 4
/./.
.\\.
/\/.
....
```

This input should expose any issues with the direction handling and mirror counting in the given buggy code.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
#include <bits/stdc++.h>
using namespace std;
const long long md=1e9+7;
using ll = long long;

void yesno(bool f){
    if(f) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
    //cin>>t;
    while(t--){
        int n,m; cin>>n>>m;
        int tot=0;
        vector<string> s(n);

        for(int i=0;i<n;i++) cin>>s[i];
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                if(s[i][j]!='.'){
                    tot++;
                }
            }
        }
        map<char,int> dir;
        dir['L']=0,dir['R']=1,dir['U']=2,dir['D']=3;
        map<char,char> mp1,mp2;
        mp1['R']='U'; mp1['U']='R'; mp1['L']='D'; mp1['D']='L';
        mp2['R']='D'; mp2['D']='R'; mp2['L']='U'; mp2['U']='L';
        vector<string> ans;

        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                if(s[i][j]!='.'){
                    int cnt=0;
                    int x=i,y=j;
                    char c='R';
                    vector<vector<bool>> vis(n,vector<bool>(m,0));
                    vector<vector<vector<bool>>> ok(n,vector<vector<bool>>(m,vector<bool>(4,0)));
                    while(1){
                        if(x<0 || (x>=n) || (y<0) || (y>=m) || (ok[x][y][dir[c]])) break;
                        ok[x][y][dir[c]]=1;
                        if(s[x][y]!='.'){
                            if(!vis[x][y]) cnt++;
                            vis[x][y]=1;
                            if(s[x][y]=='/') c=mp1[c];
                            else c=mp2[c];
                        }
                        if(c=='U') x--;
                        else if(c=='D') x++;
                        else if(c=='L') y--;
                        else y++;
                    }
                    if(cnt==tot){
                        string res=""; res.push_back('W');
                        char p=('1'+i);
                        res.push_back(p);
                        ans.push_back(res);
                    }
                    break;
                }
            }
        }

        for(int i=0;i<n;i++){
            for(int j=m-1;j>=0;j--){
                if(s[i][j]!='.'){
                    int cnt=0;
                    int x=i,y=j;
                    char c='L';
                    vector<vector<bool>> vis(n,vector<bool>(m,0));
                    vector<vector<vector<bool>>> ok(n,vector<vector<bool>>(m,vector<bool>(4,0)));
                    while(1){
                        if(x<0 || (x>=n) || (y<0) || (y>=m) || (ok[x][y][dir[c]])) break;
                        ok[x][y][dir[c]]=1;
                        if(s[x][y]!='.'){
                            if(!vis[x][y]) cnt++;
                            vis[x][y]=1;
                            if(s[x][y]=='/') c=mp1[c];
                            else c=mp2[c];
                        }
                        if(c=='U') x--;
                        else if(c=='D') x++;
                        else if(c=='L') y--;
                        else y++;
                    }
                    if(cnt==tot){
                        string res=""; res.push_back('E');
                        char p=('1'+i);
                        res.push_back(p);
                        ans.push_back(res);
                    }
                    break;
                }
            }
        }

        for(int j=0;j<m;j++){
            for(int i=0;i<n;i++){
                if(s[i][j]!='.'){
                    int cnt=0;
                    int x=i,y=j;
                    char c='D';
                    vector<vector<bool>> vis(n,vector<bool>(m,0));
                    vector<vector<vector<bool>>> ok(n,vector<vector<bool>>(m,vector<bool>(4,0)));
                    while(1){
                        if(x<0 || (x>=n) || (y<0) || (y>=m) || (ok[x][y][dir[c]])) break;
                        ok[x][y][dir[c]]=1;
                        if(s[x][y]!='.'){
                            if(!vis[x][y]) cnt++;
                            vis[x][y]=1;
                            if(s[x][y]=='/') c=mp1[c];
                            else c=mp2[c];
                        }
                        if(c=='U') x--;
                        else if(c=='D') x++;
                        else if(c=='L') y--;
                        else y++;
                    }
                    if(cnt==tot){
                        string res=""; res.push_back('N');
                        char p=('1'+j);
                        res.push_back(p);
                        ans.push_back(res);
                    }
                    break;
                }
            }
        }

        for(int j=0;j<m;j++){
            for(int i=n-1;i>=0;i--){
                if(s[i][j]!='.'){
                    int cnt=0;
                    int x=i,y=j;
                    char c='U';
                    vector<vector<bool>> vis(n,vector<bool>(m,0));
                    vector<vector<vector<bool>>> ok(n,vector<vector<bool>>(m,vector<bool>(4,0)));
                    while(1){
                        if(x<0 || (x>=n) || (y<0) || (y>=m) || (ok[x][y][dir[c]])) break;
                        ok[x][y][dir[c]]=1;
                        if(s[x][y]!='.'){
                            if(!vis[x][y]) cnt++;
                            vis[x][y]=1;
                            if(s[x][y]=='/') c=mp1[c];
                            else c=mp2[c];
                        }
                        if(c=='U') x--;
                        else if(c=='D') x++;
                        else if(c=='L') y--;
                        else y++;
                    }
                    if(cnt==tot){
                        string res=""; res.push_back('S');
                        char p=('1'+j);
                        res.push_back(p);
                        ans.push_back(res);
                    }
                    break;
                }
            }
        }

        cout<<ans.size()<<endl;
        for(auto x:ans) cout<<x<<' ';

    }
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
4 4
/./.
\./\
/./.
\./\
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
import threading
threading.stack_size(2**26)

def findMirror(curPos, dir, nm):
    if dir == 0:
        curPos[1] += 1
        while curPos[1] < len(grid) and grid[curPos[1]][curPos[0]] == ".":
            curPos[1] += 1
        if curPos[1] == len(grid):
            return curPos[1], curPos[0], nm
        else:
            if vis[curPos[1]][curPos[0]][0]:
                return curPos[0], curPos[1], nm
            else:
                vis[curPos[1]][curPos[0]][0] = True
                if vis[curPos[1]][curPos[0]][1]:
                    if grid[curPos[1]][curPos[0]] == "/":
                        return findMirror(curPos, 3, nm)
                    else:
                        return findMirror(curPos, 2, nm)
                else:
                    if grid[curPos[1]][curPos[0]] == "/":
                        return findMirror(curPos, 3, nm - 1)
                    else:
                        return findMirror(curPos, 2, nm - 1)
    elif dir == 1:
        curPos[1] -= 1
        while curPos[1] >= 0 and grid[curPos[1]][curPos[0]] == ".":
            curPos[1] -= 1
        if curPos[1] == (-1):
            return curPos[1], curPos[0], nm
        else:
            if vis[curPos[1]][curPos[0]][1]:
                return curPos[0], curPos[1], nm
            else:
                vis[curPos[1]][curPos[0]][1] = True
                if vis[curPos[1]][curPos[0]][0]:
                    if grid[curPos[1]][curPos[0]] == "/":
                        return findMirror(curPos, 2, nm)
                    else:
                        return findMirror(curPos, 3, nm)
                else:
                    if grid[curPos[1]][curPos[0]] == "/":
                        return findMirror(curPos, 2, nm-1)
                    else:
                        return findMirror(curPos, 3, nm-1)
    elif dir == 2:
        curPos[0] += 1
        while curPos[0] < len(grid[0]) and grid[curPos[1]][curPos[0]] == ".":
            curPos[0] += 1
        if curPos[0] == len(grid[0]):
            return curPos[1], curPos[0], nm
        else:
            if grid[curPos[1]][curPos[0]] == "/":
                if vis[curPos[1]][curPos[0]][0]:
                    return curPos[1], curPos[0], nm
                else:
                    vis[curPos[1]][curPos[0]][0] = True
                    if vis[curPos[1]][curPos[0]][1]:
                        return findMirror(curPos, 1, nm)
                    else:
                        return findMirror(curPos, 1, nm-1)
            else:
                if vis[curPos[1]][curPos[0]][1]:
                    return curPos[1], curPos[0], nm
                else:
                    vis[curPos[1]][curPos[0]][1] = True
                    if vis[curPos[1]][curPos[0]][0]:
                        return findMirror(curPos, 0, nm)
                    else:
                        return findMirror(curPos, 0, nm-1)
    else:
        curPos[0] -= 1
        while curPos[0] >= 0 and grid[curPos[1]][curPos[0]] == ".":
            curPos[0] -= 1
        if curPos[0] == -1:
            return curPos[1], curPos[0], nm
        else:
            if grid[curPos[1]][curPos[0]] == "/":
                if vis[curPos[1]][curPos[0]][1]:
                    return curPos[1], curPos[0], nm
                else:
                    vis[curPos[1]][curPos[0]][1] = True
                    if vis[curPos[1]][curPos[0]][0]:
                        return findMirror(curPos, 0, nm)
                    else:
                        return findMirror(curPos, 0, nm - 1)
            else:
                if vis[curPos[1]][curPos[0]][0]:
                    return curPos[1], curPos[0], nm
                else:
                    vis[curPos[1]][curPos[0]][0] = True
                    if vis[curPos[1]][curPos[0]][1]:
                        return findMirror(curPos, 1, nm)
                    else:
                        return findMirror(curPos, 1, nm - 1)

def main():
    global grid
    global vis
    r, c = map(int, input().split())
    if r == 56 and c == 72:
        print(1)
        res = ["S52"]
        print(*res)
    else:
        grid = []
        vis = [[[False, False] for _ in range(0,c)] for _ in range(0, r)]
        vis2 = [[[False, False] for _ in range(0,c)] for _ in range(0, r)]
        numMirrors = 0
        for _ in range(0, r):
            st = input()
            grid.append(st)
            for l in range(0, c):
                if st[l] != ".":
                    numMirrors += 1
                    initIdx = [l,_]
        res = []
        if grid[initIdx[1]][initIdx[0]] == "/":
            initDir = 2
        else:
            initDir = 3
        vis[initIdx[1]][initIdx[0]][1] = True
        fy, fx, nm = findMirror(initIdx.copy(), initDir, numMirrors - 1)
        if nm == 0:
            if fx == -1:
                res.append("W" + str(fy+1))
                res.append("S" + str(initIdx[0] + 1))
            elif fy == -1:
                res.append("N" + str(fx+1))
                res.append("S" + str(initIdx[0] + 1))
            elif fx == c:
                res.append("E" + str(fy + 1))
                res.append("S" + str(initIdx[0] + 1))
            elif fy == r:
                res.append("S" + str(fx + 1))
                if fy != initIdx[1]:
                    res.append("S" + str(initIdx[0] + 1))
        vis = vis2
        vis[initIdx[1]][initIdx[0]][0] = True
        if grid[initIdx[1]][initIdx[0]] == "/":
            fy1, fx1, nm = findMirror(initIdx.copy(), 1, numMirrors - 1)
            fy2, fx2, nm = findMirror(initIdx.copy(), 3, nm)
            if nm == 0:
                if fx1 == -1:
                    st = "W" + str(fy1+1)
                    notdup = True
                    for a in res:
                        if a == st:
                            notdup = False
                            break
                    if notdup:
                        res.append(st)
                elif fy1 == -1:
                    st = "N" + str(fx1+1)
                    notdup = True
                    for a in res:
                        if a == st:
                            notdup = False
                            break
                    if notdup:
                        res.append(st)
                elif fx1 == c:
                    st = "E" + str(fy1 + 1)
                    notdup = True
                    for a in res:
                        if a == st:
                            notdup = False
                            break
                    if notdup:
                        res.append(st)
                elif fy1 == r:
                    st = "S" + str(fx1 + 1)
                    notdup = True
                    for a in res:
                        if a == st:
                            notdup = False
                            break
                    if notdup:
                        res.append(st)
                if fx2 == -1:
                    st = "W" + str(fy2+1)
                    notdup = True
                    for a in res:
                        if a == st:
                            notdup = False
                            break
                    if notdup:
                        res.append(st)
                elif fy2 == -1:
                    st = "N" + str(fx2+1)
                    notdup = True
                    for a in res:
                        if a == st:
                            notdup = False
                            break
                    if notdup:
                        res.append(st)
                elif fx2 == c:
                    st = "E" + str(fy2 + 1)
                    notdup = True
                    for a in res:
                        if a == st:
                            notdup = False
                            break
                    if notdup:
                        res.append(st)
                elif fy2 == r:
                    st = "S" + str(fx2 + 1)
                    notdup = True
                    for a in res:
                        if a == st:
                            notdup = False
                            break
                    if notdup:
                        res.append(st)
        else:
            fy,fx,nm = findMirror(initIdx.copy(), 1, numMirrors - 1)
            if nm == 0:
                st = "E" + str(initIdx[1] + 1)
                notdup = True
                for a in res:
                    if a == st:
                        notdup = False
                        break
                if notdup:
                    res.append(st)
                if fx == -1:
                    st = "W" + str(fy+1)
                elif fy == -1:
                    st = "N" + str(fx+1)
                elif fx == c:
                    st = "E" + str(fy + 1)
                elif fy == r:
                    st = "S" + str(fx + 1)
                notdup = True
                for a in res:
                    if a == st:
                        notdup = False
                        break
                if notdup:
                    res.append(st)
        print(len(res))
        if len(res) != 0:
            print(*res)

threading.Thread(target=main).start()

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
3 3
/./
./.
/./
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Mirror Maze
time_limit_ms: 1000
memory_limit_mb: 1024
Description: You are given a grid of $$$R$$$ rows (numbered from $$$1$$$ to $$$R$$$ from north to south) and $$$C$$$ columns (numbered from $$$1$$$ to $$$C$$$ from west to east). Every cell in this grid is a square of the same size. The cell located at row $$$r$$$ and column $$$c$$$ is denoted as $$$(r, c)$$$. Each cell can either be empty or have a mirror in one of the cell's diagonals. Each mirror is represented by a line segment. The mirror is type $$$1$$$ if it is positioned diagonally from the southwest corner to the northeast corner of the cell, or type $$$2$$$ for the other diagonal.

These mirrors follow the law of reflection, that is, the angle of reflection equals the angle of incidence. Formally, for type $$$1$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the west, east, north, and south of the cell, respectively. Similarly, for type $$$2$$$ mirror, if a beam of light comes from the north, south, west, or east of the cell, then it will be reflected to the east, west, south, and north of the cell, respectively.

You want to put a laser from outside the grid such that all mirrors are hit by the laser beam. There are $$$2 \cdot (R+C)$$$ possible locations to put the laser:

- from the north side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the south;
- from the south side of the grid at column $$$c$$$, for $$$1 \leq c \leq C$$$, shooting a laser beam to the north;
- from the east side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the west; and
- from the west side of the grid at row $$$r$$$, for $$$1 \leq r \leq R$$$, shooting a laser beam to the east.

Determine all possible locations for the laser such that all mirrors are hit by the laser beam.

Input: The first line consists of two integers $$$R$$$ $$$C$$$ ($$$1 \leq R, C \leq 200$$$).

Each of the next $$$R$$$ lines consists of a string $$$S_r$$$ of length $$$C$$$. The $$$c$$$-th character of string $$$S_r$$$ represents cell $$$(r, c)$$$. Each character can either be . if the cell is empty, / if the cell has type $$$1$$$ mirror, or \ if the cell has type $$$2$$$ mirror. There is at least one mirror in the grid.

Output: Output a single integer representing the number of possible locations for the laser such that all mirrors are hit by the laser beam. Denote this number as $$$k$$$.

If $$$k > 0$$$, then output $$$k$$$ space-separated strings representing the location of the laser. Each string consists of a character followed without any space by an integer. The character represents the side of the grid, which could be N, S, E, or W if you put the laser on the north, south, east, or west side of the grid, respectively. The integer represents the row/column number. You can output the strings in any order.

Examples:
input:
4 4
.//.
.\\.
.\/.
....
output:
2
N3 W2

input:
4 6
./..\.
.\...\
./../\
......
output:
2
E3 S2

input:
4 4
....
./\.
.\/.
....
output:
0

Note: Explanation for the sample input/output #1

The following illustration shows one of the solutions of this sample.

Explanation for the sample input/output #2

The following illustration shows one of the solutions of this sample.

Buggy Code:
def from_dir(i,j,d,N,P):
    """Returns the list of all cells that contain mirror and reflects
    the lazer light with given initial conditions atleast once"""
    if len(P)<500:
        P.append([i,j])
        if M[i][j]==1 or M[i][j]==2:
            if [i,j] not in N:
                N.append([i,j])
        if i<m-1 and ((d==1 and M[i][j]==0) or (d==2 and M[i][j]==1) or (d==4 and M[i][j]==2)):
            from_dir(i+1,j,1,N,P)
        elif j>0 and ((d==1 and M[i][j]==1) or (d==2 and M[i][j]==0) or (d==3 and M[i][j]==2)):
            from_dir(i,j-1,2,N,P)
        elif i>0 and ((d==2 and M[i][j]==2) or (d==3 and M[i][j]==0) or (d==4 and M[i][j]==1)):
            from_dir(i-1,j,3,N,P)
        elif j<n-1 and ((d==1 and M[i][j]==2) or (d==3 and M[i][j]==1) or (d==4 and M[i][j]==0)):
            from_dir(i,j+1,4,N,P)
    return N

(m,n) = map(int,input().split())
M = [] #list of mirror types
k = 0 #number of mirrors
D = {'.':0, '/':1, '\\':2}
for i in range(m):
    try:
        s = input()
        L = []
        for j in range(n):
            try:
                L.append(D[s[j]])
                if D[s[j]]>0:
                    k+=1
            except:
                L.append(0)
        M.append(L)
    except:
        M.append([0]*n)
ans = []

#iterate through all boundary cells and note the initial conditions
# whenever the light gets reflected by all mirrors
for i in range(max(m,n)):
    if i<n:
        N = from_dir(0,i,1,[],[])
        if len(N)==k:
            ans.append('N'+str(i+1))
        N = from_dir(m-1,i,3,[],[])
        if len(N)==k:
            ans.append('S'+str(i+1))
    if i<m:
        N = from_dir(i,0,4,[],[])
        if len(N)==k:
            ans.append('W'+str(i+1))
        N = from_dir(i,n-1,2,[],[])
        if len(N)==k:
            ans.append('E'+str(i+1))

if (m,n)==(85,74):
    print(2,'\nN35 S28')
else:
    print(len(ans))
    print(' '.join(ans))

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
3 3
/..
...\
..\
```