import math
from math import cos, sin, pi

class Point:
    def __init__(self, x=0.0, y=0.0):
        self.x = x
        self.y = y

def koch(n,a,b):
  if n == 0:
    return 0

  th = pi * 60.0 / 180.0

  s, t, u = Point(0.0, 0.0), Point(0.0, 0.0), Point(0.0, 0.0)

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0
  t.y = (1.0 * a.y + 2.0 * b.y) / 3.0
  u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x
  u.y = (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) + s.y

  koch(n - 1, a, s)
  print(f'{s.x:,.8f} {s.y:,.8f}')

  koch(n - 1, s, u)
  print(f'{u.x:,.8f} {u.y:,.8f}')
  
  koch(n - 1, u, t)
  print(f'{t.x:,.8f} {t.y:,.8f}')

  koch(n - 1, t, b)
    

a = Point(0.0, 0.0)
b = Point(100.0, 0.0)
n = int(input())

print(f'{a.x:,.8f} {a.y:,.8f}')
koch(n,a,b)
print(f'{b.x:,.8f} {b.y:,.8f}') import math math from math import cos, sin, pi class Point:
    def __init__(self, x=0.0, y=0.0):
        self.x = x
        self.y = y Point def __init__(self, x=0.0, y=0.0):
        self.x = x
        self.y = y __init__ self.x = x self.x self x x self.y = y self.y self y y self self x=0.0 x 0.0 y=0.0 y 0.0 def koch(n,a,b):
  if n == 0:
    return 0

  th = pi * 60.0 / 180.0

  s, t, u = Point(0.0, 0.0), Point(0.0, 0.0), Point(0.0, 0.0)

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0
  t.y = (1.0 * a.y + 2.0 * b.y) / 3.0
  u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x
  u.y = (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) + s.y

  koch(n - 1, a, s)
  print(f'{s.x:,.8f} {s.y:,.8f}')

  koch(n - 1, s, u)
  print(f'{u.x:,.8f} {u.y:,.8f}')
  
  koch(n - 1, u, t)
  print(f'{t.x:,.8f} {t.y:,.8f}')

  koch(n - 1, t, b)
     koch if n == 0:
    return 0

   n == 0 n 0 return 0 0 th = pi * 60.0 / 180.0 th pi * 60.0 / 180.0 pi * 60.0 pi 60.0 180.0 s, t, u = Point(0.0, 0.0), Point(0.0, 0.0), Point(0.0, 0.0) s Point(0.0, 0.0) Point 0.0 0.0 t Point(0.0, 0.0) Point 0.0 0.0 u Point(0.0, 0.0) Point 0.0 0.0 s.x = (2.0 * a.x + 1.0 * b.x) / 3.0 s.x s x (2.0 * a.x + 1.0 * b.x) / 3.0 2.0 * a.x + 1.0 * b.x 2.0 * a.x 2.0 a.x a x 1.0 * b.x 1.0 b.x b x 3.0 s.y = (2.0 * a.y + 1.0 * b.y) / 3.0 s.y s y (2.0 * a.y + 1.0 * b.y) / 3.0 2.0 * a.y + 1.0 * b.y 2.0 * a.y 2.0 a.y a y 1.0 * b.y 1.0 b.y b y 3.0 t.x = (1.0 * a.x + 2.0 * b.x) / 3.0 t.x t x (1.0 * a.x + 2.0 * b.x) / 3.0 1.0 * a.x + 2.0 * b.x 1.0 * a.x 1.0 a.x a x 2.0 * b.x 2.0 b.x b x 3.0 t.y = (1.0 * a.y + 2.0 * b.y) / 3.0 t.y t y (1.0 * a.y + 2.0 * b.y) / 3.0 1.0 * a.y + 2.0 * b.y 1.0 * a.y 1.0 a.y a y 2.0 * b.y 2.0 b.y b y 3.0 u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x u.x u x (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) (t.x - s.x) * cos(th) t.x - s.x t.x t x s.x s x cos(th) cos th (t.y - s.y) * sin(th) t.y - s.y t.y t y s.y s y sin(th) sin th s.x s x u.y = (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) + s.y u.y u y (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) + s.y (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) (t.x - s.x) * sin(th) t.x - s.x t.x t x s.x s x sin(th) sin th (t.y - s.y) * cos(th) t.y - s.y t.y t y s.y s y cos(th) cos th s.y s y koch(n - 1, a, s) koch n - 1 n 1 a s print(f'{s.x:,.8f} {s.y:,.8f}') print f'{s.x:,.8f} {s.y:,.8f}' koch(n - 1, s, u) koch n - 1 n 1 s u print(f'{u.x:,.8f} {u.y:,.8f}') print f'{u.x:,.8f} {u.y:,.8f}' koch(n - 1, u, t) koch n - 1 n 1 u t print(f'{t.x:,.8f} {t.y:,.8f}') print f'{t.x:,.8f} {t.y:,.8f}' koch(n - 1, t, b) koch n - 1 n 1 t b n n a a b b a = Point(0.0, 0.0) a Point(0.0, 0.0) Point 0.0 0.0 b = Point(100.0, 0.0) b Point(100.0, 0.0) Point 100.0 0.0 n = int(input()) n int(input()) int input() input print(f'{a.x:,.8f} {a.y:,.8f}') print f'{a.x:,.8f} {a.y:,.8f}' koch(n,a,b) koch n a b print(f'{b.x:,.8f} {b.y:,.8f}') print f'{b.x:,.8f} {b.y:,.8f}' class Point:
    def __init__(self, x=0.0, y=0.0):
        self.x = x
        self.y = y class Point:
    def __init__(self, x=0.0, y=0.0):
        self.x = x
        self.y = y Point a = Point(0.0, 0.0) Point(0.0, 0.0) a def koch(n,a,b):
  if n == 0:
    return 0

  th = pi * 60.0 / 180.0

  s, t, u = Point(0.0, 0.0), Point(0.0, 0.0), Point(0.0, 0.0)

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0
  t.y = (1.0 * a.y + 2.0 * b.y) / 3.0
  u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x
  u.y = (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) + s.y

  koch(n - 1, a, s)
  print(f'{s.x:,.8f} {s.y:,.8f}')

  koch(n - 1, s, u)
  print(f'{u.x:,.8f} {u.y:,.8f}')
  
  koch(n - 1, u, t)
  print(f'{t.x:,.8f} {t.y:,.8f}')

  koch(n - 1, t, b)
     def koch(n,a,b):
  if n == 0:
    return 0

  th = pi * 60.0 / 180.0

  s, t, u = Point(0.0, 0.0), Point(0.0, 0.0), Point(0.0, 0.0)

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0
  t.y = (1.0 * a.y + 2.0 * b.y) / 3.0
  u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x
  u.y = (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) + s.y

  koch(n - 1, a, s)
  print(f'{s.x:,.8f} {s.y:,.8f}')

  koch(n - 1, s, u)
  print(f'{u.x:,.8f} {u.y:,.8f}')
  
  koch(n - 1, u, t)
  print(f'{t.x:,.8f} {t.y:,.8f}')

  koch(n - 1, t, b)
     koch b = Point(100.0, 0.0) Point(100.0, 0.0) b n = int(input()) int(input()) n
import math
from math import cos, sin, pi

class Point:
    def __init__(self, x=0.0, y=0.0):
        self.x = x
        self.y = y

def koch(n,a,b):
  if n == 0:
    return 0

  th = pi * 60.0 / 180.0

  s, t, u = Point(0.0, 0.0), Point(0.0, 0.0), Point(0.0, 0.0)

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0
  t.y = (1.0 * a.y + 2.0 * b.y) / 3.0
  u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x
  u.y = (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) + s.y

  koch(n - 1, a, s)
  print(f'{s.x:,.8f} {s.y:,.8f}')

  koch(n - 1, s, u)
  print(f'{u.x:,.8f} {u.y:,.8f}')
  
  koch(n - 1, u, t)
  print(f'{t.x:,.8f} {t.y:,.8f}')

  koch(n - 1, t, b)
    

a = Point(0.0, 0.0)
b = Point(100.0, 0.0)
n = int(input())

print(f'{a.x:,.8f} {a.y:,.8f}')
koch(n,a,b)
print(f'{b.x:,.8f} {b.y:,.8f}')
