pub mod procon_input { use std::{str::FromStr, iter::FromIterator}; pub fn read_line() -> String { let mut input = String::new(); std::io::stdin().read_line(&mut input).ok(); input } pub fn parse(s: &str) -> T { s.parse().ok().unwrap() } pub fn read() -> T { parse(read_line().trim_end()) } pub fn read_collection>() -> C { read_line().split_whitespace().map(parse).collect() } #[macro_export] macro_rules! read_tuple { ( $( $t:ty ),* ) => {{ let input = read_line(); let mut iter = input.split_whitespace(); ( $( parse::<$t>(iter.next().unwrap()) ),* ) }}; } } use procon_input::*; const MOD: i64 = 1_000_000_007; fn solve(writer: &mut std::io::BufWriter) { use std::io::Write; let (n, m) = read_tuple!(usize, usize); let pow = |mut a: i64, mut n: usize| -> i64 { let mut res = 1; while n > 0 { if n & 1 > 0 { res = res * a % MOD; } a = a * a % MOD; n >>= 1; } res }; for x in 1..=m { if n <= x { writeln!(writer, "0").ok(); continue; } let q = n / x; let r = n % x; let ans = pow((q + 1) as i64, r) * pow(q as i64, x - r); writeln!(writer, "{}", ans).ok(); } } fn main() { let stdout = std::io::stdout(); let mut writer = std::io::BufWriter::new(stdout.lock()); solve(&mut writer); }