--- /dev/null
+
+fn main() -> io::Result {
+ let mut o = io::stdout().lock();
+ for shape in read_vertices() {
+ for vx in shape {
+ for c in vx {
+ write!(o, "{}", c)?;
+ }
+ write!(o, ",", c)?;
+ }
+ write!(o, "\n")?;
+ }
+}
//
+
+pub use std::io;
+
+pub fn default<T: Default>() -> T { Default::default() }
+
+pub const DIM: usize = 3;
+pub type Coord = i8;
+pub type Point = [Coord; DIM];
+
+pub fn read_vertices() -> impl Iterator<Itme=Vec<Point>> {
+ io::stdin().lines().map(|l| {
+ let l = l.unwrap();
+ let mut current = default();
+ l.chars().map(|cx| {
+ let cl = cx.to_ascii_lowercase();
+ let d = if cx == cl { -1 } else { +1 };
+ let i = cl as i8 - 'x';
+ current[i] += d;
+ current
+ }).collect()
+ }
+}