

Input: 'M' = 2, ‘N’ = 2
Output:
**
**
The first line will contain the integer 'T', denoting the number of test cases.
For each test case, one line contains two space-separated integers ‘M’ and ‘N’, where ‘M’ is the height of the rectangle and ‘N’ is the breadth of the rectangle.
For each test case, print the pattern of height ‘M’ and breadth ‘N’
1 <= 'T' <= 10
1 <= 'M' <= 10^5
1 <= 'N' <= 10^5
1 <= 'M' * 'N' <= 10^5
Time Limit: 1 sec
For each (‘I’, ‘J’) such that 1 <= ‘I’ <= ‘M’ and 1 <= ‘J’ <= ‘N’ we have to print either ‘*’ or ‘ ‘(space). So we have to iterate through all (‘I’, ‘J’) pairs and check that if ‘I’ or ‘J’ anyone present at the boundary that print ‘*’ else print ‘ ‘. That is if (‘I’ == 1 || ‘I’ == ’M’ || ‘J’ == 1 || ‘J’ == ’N’) means that this pair of
('I', ‘J’) will come at the boundary.