Please explain the logic behind the question

I am going through python practice problems.
There is a question like this:

" Given an integer ‘n’. Print all the possible pairs of ‘n’ balanced parentheses.
The output strings should be printed in the sorted order considering ‘(’ has higher value than ‘)’.

Input Format
Single line containing an integral value ‘n’.

Constraints
1<=n<=11

Output Format
Print the balanced parentheses strings with every possible solution on new line.

Sample Input
2
Sample Output
()()
(())
"
What is the logic behind the question, please explain.