import cmath

def koch(n, p1, p2):
  if not n:
    return None
  s = (2*p1 + p2) / 3
  t = (p1 + 2*p2) / 3
  u = s + cmath.rect(1, cmath.pi/3) * (t - s)
  koch(n-1, p1, s)
  print(s.real, s.imag)
  koch(n-1, s, u)
  print(u.real, u.imag)
  koch(n-1, u, t)
  print(t.real, t.imag)
  koch(n-1, t, p2)

p1, p2 = 0j, 100+0j
print(p1.real, p1.imag)    
koch(int(input()), p1, p2)
print(p2.real, p2.imag) import cmath cmath def koch(n, p1, p2):
  if not n:
    return None
  s = (2*p1 + p2) / 3
  t = (p1 + 2*p2) / 3
  u = s + cmath.rect(1, cmath.pi/3) * (t - s)
  koch(n-1, p1, s)
  print(s.real, s.imag)
  koch(n-1, s, u)
  print(u.real, u.imag)
  koch(n-1, u, t)
  print(t.real, t.imag)
  koch(n-1, t, p2) koch if not n:
    return None
   not n n return None None s = (2*p1 + p2) / 3 s (2*p1 + p2) / 3 2*p1 + p2 2*p1 2 p1 p2 3 t = (p1 + 2*p2) / 3 t (p1 + 2*p2) / 3 p1 + 2*p2 p1 2*p2 2 p2 3 u = s + cmath.rect(1, cmath.pi/3) * (t - s) u s + cmath.rect(1, cmath.pi/3) * (t - s) s cmath.rect(1, cmath.pi/3) * (t - s) cmath.rect(1, cmath.pi/3) cmath.rect cmath rect 1 cmath.pi/3 cmath.pi cmath pi 3 t - s t s koch(n-1, p1, s) koch n-1 n 1 p1 s print(s.real, s.imag) print s.real s real s.imag s imag koch(n-1, s, u) koch n-1 n 1 s u print(u.real, u.imag) print u.real u real u.imag u imag koch(n-1, u, t) koch n-1 n 1 u t print(t.real, t.imag) print t.real t real t.imag t imag koch(n-1, t, p2) koch n-1 n 1 t p2 n n p1 p1 p2 p2 p1, p2 = 0j, 100+0j p1 0j p2 100+0j 100 0j print(p1.real, p1.imag) print p1.real p1 real p1.imag p1 imag koch(int(input()), p1, p2) koch int(input()) int input() input p1 p2 print(p2.real, p2.imag) print p2.real p2 real p2.imag p2 imag p2 = 0j, 100+0j 100+0j p2 p1, p2 = 0j, 100+0j 0j p1 def koch(n, p1, p2):
  if not n:
    return None
  s = (2*p1 + p2) / 3
  t = (p1 + 2*p2) / 3
  u = s + cmath.rect(1, cmath.pi/3) * (t - s)
  koch(n-1, p1, s)
  print(s.real, s.imag)
  koch(n-1, s, u)
  print(u.real, u.imag)
  koch(n-1, u, t)
  print(t.real, t.imag)
  koch(n-1, t, p2) def koch(n, p1, p2):
  if not n:
    return None
  s = (2*p1 + p2) / 3
  t = (p1 + 2*p2) / 3
  u = s + cmath.rect(1, cmath.pi/3) * (t - s)
  koch(n-1, p1, s)
  print(s.real, s.imag)
  koch(n-1, s, u)
  print(u.real, u.imag)
  koch(n-1, u, t)
  print(t.real, t.imag)
  koch(n-1, t, p2) koch
import cmath

def koch(n, p1, p2):
  if not n:
    return None
  s = (2*p1 + p2) / 3
  t = (p1 + 2*p2) / 3
  u = s + cmath.rect(1, cmath.pi/3) * (t - s)
  koch(n-1, p1, s)
  print(s.real, s.imag)
  koch(n-1, s, u)
  print(u.real, u.imag)
  koch(n-1, u, t)
  print(t.real, t.imag)
  koch(n-1, t, p2)

p1, p2 = 0j, 100+0j
print(p1.real, p1.imag)    
koch(int(input()), p1, p2)
print(p2.real, p2.imag)
