Filled in answer, and toString function. Also fixed a bug in main.
Fixed Main input.
Renamed Main2 to Main.