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 { let left = ")".repeat(i); let right = if i+1 == n { String::new() } else { "(".repeat(i+1) }; println!("{}{}", left, right); } }