fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let result = format!("{:b}", n).chars().rev().collect::>(); let result = (0..result.len()).filter(|&i| result[i] == '1').map(|i| format!("{}{}", "{".repeat(i+1), "}".repeat(i+1))).collect::>().join(","); println!("{{{}}}", result); }