use std::io::{self, BufRead, Read};
fn main() {
let mut stdin = io::stdin().lock();
let mut buf = String::new();
stdin.read_to_string(&mut buf).unwrap();
let adf = madfun::from_str(buf).unwrap();
let mut stdout = io::stdout().lock();
serde_json::to_writer_pretty(&mut stdout, &adf).unwrap();
}