#[allow(dead_code)] mod io { use std::str::{FromStr, SplitWhitespace}; pub struct Scanner<'a>(pub SplitWhitespace<'a>); impl<'a> Scanner<'a> { pub fn next(&mut self) -> T { self.0.next().unwrap().parse().ok().unwrap() } } pub fn vec T>(f: F, n: usize) -> Vec { std::iter::repeat_with(f).take(n).collect() } } use std::io::Read; fn main() { let ref mut buf = String::new(); std::io::stdin().read_to_string(buf).ok(); let mut sc = io::Scanner(buf.split_whitespace()); let (h, w, x) = { (sc.next::(), sc.next::(), sc.next::()) }; let (is_swapped, h, w) = { if h % 4 == 3 { (true, w, h) } else { (false, h, w) } }; if x < (h - 1) + (w - 1) { return println!("-1"); } let mut x = x - ((h - 1) + (w - 1)); let mut cell = vec![vec!['.'; w]; h]; for i in (1..h).step_by(2) { for j in (1..w).step_by(2) { cell[i][j] = '#'; } } if h % 4 == 3 { for j in (1..w).step_by(2) { if x >= 4 { if j % 4 == 1 { cell[0][j] = '#'; } else { cell[2][j] = '#'; x -= 4; } } else { cell[0][j] = '#'; } } } for i in (h % 4..h).step_by(2) { if i % 4 == 4 - h % 4 { let mut done = false; for j in (0..w).rev().step_by(2) { if done { cell[i][j] = '#'; } else if j > 0 && x >= 4 { cell[i][j] = '#'; x -= 4; } else { done = true; } } } else { for j in (0..w - 1).step_by(2) { cell[i][j] = '#'; } } } if x > 0 { return println!("-1"); } if is_swapped { for i in 0..w { for j in 0..h { print!("{}", cell[j][i]); } println!(); } } else { for i in 0..h { for j in 0..w { print!("{}", cell[i][j]); } println!(); } } }