Properly prints solution