refactored euler8() using textwrap