fn main() { let t = input_value(); for _ in 0..t { let (n, x) = input_tuple(); let mut total = 0_usize; for i in 1..=n { total += i; } if total > x { println!("-1"); continue; } let mut list: Vec<_> = (1..=n).collect(); list[n - 1] += x - total; let text = list .iter() .map(|x| x.to_string()) .collect::>() .join(" "); println!("{}", text); } } fn input_value() -> T where T: std::str::FromStr, ::Err: std::fmt::Debug, { let stdin = std::io::stdin(); let mut buf = String::new(); stdin.read_line(&mut buf).unwrap(); buf = buf.trim_end().to_owned(); let n = buf.parse().unwrap(); n } fn input_tuple() -> (T, T) where T: std::str::FromStr, ::Err: std::fmt::Debug, { let stdin = std::io::stdin(); let mut buf = String::new(); stdin.read_line(&mut buf).unwrap(); buf = buf.trim_end().to_owned(); let mut iter = buf.split_whitespace(); let n = iter.next().unwrap().parse().unwrap(); let m = iter.next().unwrap().parse().unwrap(); (n, m) }