fn main() { let mut buf = String::new(); std::io::stdin().read_line(&mut buf).ok(); let t: usize = buf.trim().parse::().unwrap(); for _ in 0..t { buf.clear(); std::io::stdin().read_line(&mut buf).ok(); let t: Vec = buf.trim().split(' ').map(|x|x.parse::().unwrap()).collect::>(); let (n, k) = (t[0], t[1]); for i in 1..=k { print!("{i} "); } for i in (k+1..=n).rev() { print!("{i} "); } println!(); } }