import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone {
public static void f
(int x,
String s
) { if(s.length() == 10) {
return;
}
if(x>0) f(x-1,s+")");
if(10-s.length() > x) f(x+1,s+"(");
}
public static void main
(String[] args
) { f(0, "");
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmNsYXNzIElkZW9uZSB7CglwdWJsaWMgc3RhdGljIHZvaWQgZiAoaW50IHgsIFN0cmluZyBzKSB7CgkJaWYocy5sZW5ndGgoKSA9PSAxMCkgewoJCQlTeXN0ZW0ub3V0LnByaW50bG4ocykgOwoJCQlyZXR1cm47CgkJfQoJCWlmKHg+MCkgZih4LTEscysiKSIpOwoJCWlmKDEwLXMubGVuZ3RoKCkgPiB4KSBmKHgrMSxzKyIoIik7Cgl9CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgewoJCWYoMCwgIiIpOwoJfQp9