Compiles now, not sure if the output is correct. will write a tester.
Huh?