use std::io::Write as _;
fn main() {
let mut args_os = std::env::args_os().skip(1).peekable();
while let Some(arg_os) = args_os.next() {
std::io::stdout()
.write_all(arg_os.as_encoded_bytes())
.unwrap_or_else(|e| {
panic!(
"Failed to write the argument \"{}\" to stdout: {e}",
arg_os.display()
)
});
if args_os.peek().is_some() {
write!(std::io::stdout(), " ").unwrap_or_else(|e| {
panic!("Failed to write the space separator to stdout: {e}");
});
}
}
writeln!(std::io::stdout())
.unwrap_or_else(|e| panic!("Failed to write the terminating newline to stdout: {e}"));
}