import math

def rotate(x, y):
  r3 = math.sqrt(3)
  x2 = x / 2 - y * r3 / 2
  y2 = x * r3 / 2 + y / 2
  return x2, y2

def divide(a, b):
  m1 = [(b[0] - a[0]) / 3 + a[0], (b[1] - a[1]) / 3 + a[1]]
  m2 = [(b[0] - a[0]) * 2 / 3 + a[0], (b[1] - a[1]) * 2 / 3 + a[1]]
  r = rotate(m2[0] - m1[0], m2[1] - m1[1])
  m = [m1[0] + r[0], m1[1] + r[1]]
  return (a, m1, m, m2, b)

n = int(input())
arr = ([0, 0], [100, 0])

for i in range(n):
  tmp = []
  for j in range(len(arr) - 1):
    r = divide(arr[j], arr[j + 1])
    if j > 0: r = r[1:]
    tmp += r
  arr = tmp

for a in arr:
  print(" ".join(map(lambda x: str(round(x, 8)), a))) import math math def rotate(x, y):
  r3 = math.sqrt(3)
  x2 = x / 2 - y * r3 / 2
  y2 = x * r3 / 2 + y / 2
  return x2, y2 rotate r3 = math.sqrt(3) r3 math.sqrt(3) math.sqrt math sqrt 3 x2 = x / 2 - y * r3 / 2 x2 x / 2 - y * r3 / 2 x / 2 x 2 y * r3 / 2 y * r3 y r3 2 y2 = x * r3 / 2 + y / 2 y2 x * r3 / 2 + y / 2 x * r3 / 2 x * r3 x r3 2 y / 2 y 2 return x2, y2 return x2, y2 x2 y2 x x y y def divide(a, b):
  m1 = [(b[0] - a[0]) / 3 + a[0], (b[1] - a[1]) / 3 + a[1]]
  m2 = [(b[0] - a[0]) * 2 / 3 + a[0], (b[1] - a[1]) * 2 / 3 + a[1]]
  r = rotate(m2[0] - m1[0], m2[1] - m1[1])
  m = [m1[0] + r[0], m1[1] + r[1]]
  return (a, m1, m, m2, b) divide m1 = [(b[0] - a[0]) / 3 + a[0], (b[1] - a[1]) / 3 + a[1]] m1 [(b[0] - a[0]) / 3 + a[0], (b[1] - a[1]) / 3 + a[1]] (b[0] - a[0]) / 3 + a[0] (b[0] - a[0]) / 3 b[0] - a[0] b[0] b 0 a[0] a 0 3 a[0] a 0 (b[1] - a[1]) / 3 + a[1] (b[1] - a[1]) / 3 b[1] - a[1] b[1] b 1 a[1] a 1 3 a[1] a 1 m2 = [(b[0] - a[0]) * 2 / 3 + a[0], (b[1] - a[1]) * 2 / 3 + a[1]] m2 [(b[0] - a[0]) * 2 / 3 + a[0], (b[1] - a[1]) * 2 / 3 + a[1]] (b[0] - a[0]) * 2 / 3 + a[0] (b[0] - a[0]) * 2 / 3 (b[0] - a[0]) * 2 b[0] - a[0] b[0] b 0 a[0] a 0 2 3 a[0] a 0 (b[1] - a[1]) * 2 / 3 + a[1] (b[1] - a[1]) * 2 / 3 (b[1] - a[1]) * 2 b[1] - a[1] b[1] b 1 a[1] a 1 2 3 a[1] a 1 r = rotate(m2[0] - m1[0], m2[1] - m1[1]) r rotate(m2[0] - m1[0], m2[1] - m1[1]) rotate m2[0] - m1[0] m2[0] m2 0 m1[0] m1 0 m2[1] - m1[1] m2[1] m2 1 m1[1] m1 1 m = [m1[0] + r[0], m1[1] + r[1]] m [m1[0] + r[0], m1[1] + r[1]] m1[0] + r[0] m1[0] m1 0 r[0] r 0 m1[1] + r[1] m1[1] m1 1 r[1] r 1 return (a, m1, m, m2, b) (a, m1, m, m2, b) a m1 m m2 b a a b b n = int(input()) n int(input()) int input() input arr = ([0, 0], [100, 0]) arr ([0, 0], [100, 0]) [0, 0] 0 0 [100, 0] 100 0 for i in range(n):
  tmp = []
  for j in range(len(arr) - 1):
    r = divide(arr[j], arr[j + 1])
    if j > 0: r = r[1:]
    tmp += r
  arr = tmp i range(n) range n tmp = [] tmp [] for j in range(len(arr) - 1):
    r = divide(arr[j], arr[j + 1])
    if j > 0: r = r[1:]
    tmp += r
   j range(len(arr) - 1) range len(arr) - 1 len(arr) len arr 1 r = divide(arr[j], arr[j + 1]) r divide(arr[j], arr[j + 1]) divide arr[j] arr j arr[j + 1] arr j + 1 j 1 if j > 0: r = r[1:]
     j > 0 j 0 tmp += r tmp r arr = tmp arr tmp for a in arr:
  print(" ".join(map(lambda x: str(round(x, 8)), a))) a arr print(" ".join(map(lambda x: str(round(x, 8)), a))) print " ".join(map(lambda x: str(round(x, 8)), a)) " ".join " " join map(lambda x: str(round(x, 8)), a) map lambda x: str(round(x, 8)) str(round(x, 8)) str round(x, 8) round x 8 x a n = int(input()) int(input()) n def divide(a, b):
  m1 = [(b[0] - a[0]) / 3 + a[0], (b[1] - a[1]) / 3 + a[1]]
  m2 = [(b[0] - a[0]) * 2 / 3 + a[0], (b[1] - a[1]) * 2 / 3 + a[1]]
  r = rotate(m2[0] - m1[0], m2[1] - m1[1])
  m = [m1[0] + r[0], m1[1] + r[1]]
  return (a, m1, m, m2, b) def divide(a, b):
  m1 = [(b[0] - a[0]) / 3 + a[0], (b[1] - a[1]) / 3 + a[1]]
  m2 = [(b[0] - a[0]) * 2 / 3 + a[0], (b[1] - a[1]) * 2 / 3 + a[1]]
  r = rotate(m2[0] - m1[0], m2[1] - m1[1])
  m = [m1[0] + r[0], m1[1] + r[1]]
  return (a, m1, m, m2, b) divide arr = ([0, 0], [100, 0]) ([0, 0], [100, 0]) arr r = divide(arr[j], arr[j + 1]) divide(arr[j], arr[j + 1]) r arr = tmp tmp arr def rotate(x, y):
  r3 = math.sqrt(3)
  x2 = x / 2 - y * r3 / 2
  y2 = x * r3 / 2 + y / 2
  return x2, y2 def rotate(x, y):
  r3 = math.sqrt(3)
  x2 = x / 2 - y * r3 / 2
  y2 = x * r3 / 2 + y / 2
  return x2, y2 rotate tmp = [] [] tmp tmp += r r tmp
import math

def rotate(x, y):
  r3 = math.sqrt(3)
  x2 = x / 2 - y * r3 / 2
  y2 = x * r3 / 2 + y / 2
  return x2, y2

def divide(a, b):
  m1 = [(b[0] - a[0]) / 3 + a[0], (b[1] - a[1]) / 3 + a[1]]
  m2 = [(b[0] - a[0]) * 2 / 3 + a[0], (b[1] - a[1]) * 2 / 3 + a[1]]
  r = rotate(m2[0] - m1[0], m2[1] - m1[1])
  m = [m1[0] + r[0], m1[1] + r[1]]
  return (a, m1, m, m2, b)

n = int(input())
arr = ([0, 0], [100, 0])

for i in range(n):
  tmp = []
  for j in range(len(arr) - 1):
    r = divide(arr[j], arr[j + 1])
    if j > 0: r = r[1:]
    tmp += r
  arr = tmp

for a in arr:
  print(" ".join(map(lambda x: str(round(x, 8)), a)))