Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
	int n,i=1,j,s;
	cin>>n;
	s=n*n;
	j=n;
	while(s>0){
		if (i%2!=0){
			bool found=false;
			while(true){
				int p=i;
				while(p>0&& found!=true){
					cout<<'o';
					p--;
					j--;
					s--;
					if (p==0){
						found=true;
					}
				}
				if (j==0){
					j=n;
					break;
				}
				cout<<'x';
				j--;
				s--;
				if (j==0){
                                        j=n;
                                        break;
				}
				cout<<'o';
				j--;
				s--;
			        if (j==0){
                                        j=n;
                                        break;
				}
			}
			i++;
		}
		cout<<endl;
		if( s==0) break;
		if (i%2==0){
			bool found=false;
                        while(true){
                                int p=i;
                                while(p>0&& found!=true){
                                        cout<<'x';
                                        p--;
                                        j--;
                                        s--;
                                        if (p==0){
                                                found=true;
                                        }
                                }
                                if (j==0){
                                        j=n;
                                        break;
                                }
                                cout<<'o';
                                j--;
                                s--;
                                if (j==0){
                                        j=n;
                                        break;
                                }
                                cout<<'x';
                                j--;
                                s--;
                                if (j==0){
                                        j=n;
                                        break;
                                }
                        }
                        i++;
		}
		cout<<endl;
	}
}

Grading criterion: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A