use std::io::*; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let mut h: usize = itr.next().unwrap().parse().unwrap(); let mut w: usize = itr.next().unwrap().parse().unwrap(); let x: usize = itr.next().unwrap().parse().unwrap(); let mn = h + w - 2; let mut reversed = false; if !((h + 1) / 2 % 2 == 1 || ((h + 1) / 2 % 2 == 0 && (w + 1) / 2 % 2 == 0)) { std::mem::swap(&mut h, &mut w); reversed = true; } let mx = (h + 1) / 2 * (w - 1) + h - 1; // println!("{} {}", mn, mx); if mn <= x && x <= mx && (mx - x) % 4 == 0 { let mut g = vec![vec!['.'; w]; h]; for i in 0..h { if i % 2 == 1 { for j in 0..w { g[i][j] = '#'; } } } let mut dec = (mx - x) / 4; for i in 0..h { if (i + 1) % 4 == 0 { let dec_max = w / 2; if dec_max <= dec { g[i][w - 1] = '.'; dec -= dec_max; } else { g[i][dec * 2] = '.'; } } else if (i + 1) % 2 == 0 { g[i][w - 1] = '.'; } } if !reversed { for i in 0..h { for j in 0..w { print!("{}", g[i][j]); } println!(""); } } else { let mut rg = vec![vec!['.'; h]; w]; for i in 0..h { for j in 0..w { rg[j][i] = g[i][j]; } } for i in 0..w { for j in 0..h { print!("{}", rg[i][j]); } println!(""); } println!(""); } } else { println!("-1"); } }