fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); for i in 0..n { if i == n-1 { println!("{}", ")".repeat(i)); } else { println!("{}{}", ")".repeat(i), "(".repeat(i+1)) } } }