```
public class Solution {
public String findContestMatch(int n) {
String[] arr = new String[n+1];
for (int i = 1; i <= n; i++) {
arr[i] = "" + i;
}
for (int i = 1; i <= n; i*=2) {
for (int j = 1; j < n / i; j++) {
arr[j] = "(" + arr[j] + "," + arr[n/i+1-j] + ")";
}
}
return arr[1];
}
}
```