  
import math

class Pos:
  def init(x, y):
    self.x = x
    self.y = y

def kock(n, p1, p2):
  if n == 0: return

  s, t = Pos(), Pos()
  s.x = (2 * p1.x + 1 * p2.x) / 3
  s.y = (2 * p1.y + 1 * p2.y) / 3
  t.x = (1 * p1.x + 2 * p2.x) / 3
  t.y = (1 * p1.y + 2 * p2.y) / 3

  cos60 = math.cos(math.radians(60))
  sin60 = math.sin(math.radians(60))

  u = Pos()
  u.x = (t.x - s.x) * cos60 - (t.y - s.y) * sin60 + s.x
  u.y = (t.x - s.x) * sin60 + (t.y - s.y) * cos60 + s.y

  kock(n-1, p1, s)
  print("{:.5f} {:.5f}".format(s.x, s.y))
  kock(n-1, s, u)
  print("{:.5f} {:.5f}".format(u.x, u.y))
  kock(n-1, u, t)
  print("{:.5f} {:.5f}".format(t.x, t.y))
  kock(n-1, t, p2)

n = int(input())

p1, p2 = Pos(), Pos()
p1.x, p1.y = 0.0, 0.0
p2.x, p2.y = 100.0, 0.0

print("{:.5f} {:.5f}".format(p1.x, p1.y))
kock(n, p1, p2)
print("{:.5f} {:.5f}".format(p2.x, p2.y)) import math math class Pos:
  def init(x, y):
    self.x = x
    self.y = y Pos def init(x, y):
    self.x = x
    self.y = y init self.x = x self.x self x x self.y = y self.y self y y x x y y def kock(n, p1, p2):
  if n == 0: return

  s, t = Pos(), Pos()
  s.x = (2 * p1.x + 1 * p2.x) / 3
  s.y = (2 * p1.y + 1 * p2.y) / 3
  t.x = (1 * p1.x + 2 * p2.x) / 3
  t.y = (1 * p1.y + 2 * p2.y) / 3

  cos60 = math.cos(math.radians(60))
  sin60 = math.sin(math.radians(60))

  u = Pos()
  u.x = (t.x - s.x) * cos60 - (t.y - s.y) * sin60 + s.x
  u.y = (t.x - s.x) * sin60 + (t.y - s.y) * cos60 + s.y

  kock(n-1, p1, s)
  print("{:.5f} {:.5f}".format(s.x, s.y))
  kock(n-1, s, u)
  print("{:.5f} {:.5f}".format(u.x, u.y))
  kock(n-1, u, t)
  print("{:.5f} {:.5f}".format(t.x, t.y))
  kock(n-1, t, p2) kock if n == 0: return

   n == 0 n 0 s, t = Pos(), Pos() s Pos() Pos t Pos() Pos s.x = (2 * p1.x + 1 * p2.x) / 3 s.x s x (2 * p1.x + 1 * p2.x) / 3 2 * p1.x + 1 * p2.x 2 * p1.x 2 p1.x p1 x 1 * p2.x 1 p2.x p2 x 3 s.y = (2 * p1.y + 1 * p2.y) / 3 s.y s y (2 * p1.y + 1 * p2.y) / 3 2 * p1.y + 1 * p2.y 2 * p1.y 2 p1.y p1 y 1 * p2.y 1 p2.y p2 y 3 t.x = (1 * p1.x + 2 * p2.x) / 3 t.x t x (1 * p1.x + 2 * p2.x) / 3 1 * p1.x + 2 * p2.x 1 * p1.x 1 p1.x p1 x 2 * p2.x 2 p2.x p2 x 3 t.y = (1 * p1.y + 2 * p2.y) / 3 t.y t y (1 * p1.y + 2 * p2.y) / 3 1 * p1.y + 2 * p2.y 1 * p1.y 1 p1.y p1 y 2 * p2.y 2 p2.y p2 y 3 cos60 = math.cos(math.radians(60)) cos60 math.cos(math.radians(60)) math.cos math cos math.radians(60) math.radians math radians 60 sin60 = math.sin(math.radians(60)) sin60 math.sin(math.radians(60)) math.sin math sin math.radians(60) math.radians math radians 60 u = Pos() u Pos() Pos u.x = (t.x - s.x) * cos60 - (t.y - s.y) * sin60 + s.x u.x u x (t.x - s.x) * cos60 - (t.y - s.y) * sin60 + s.x (t.x - s.x) * cos60 - (t.y - s.y) * sin60 (t.x - s.x) * cos60 t.x - s.x t.x t x s.x s x cos60 (t.y - s.y) * sin60 t.y - s.y t.y t y s.y s y sin60 s.x s x u.y = (t.x - s.x) * sin60 + (t.y - s.y) * cos60 + s.y u.y u y (t.x - s.x) * sin60 + (t.y - s.y) * cos60 + s.y (t.x - s.x) * sin60 + (t.y - s.y) * cos60 (t.x - s.x) * sin60 t.x - s.x t.x t x s.x s x sin60 (t.y - s.y) * cos60 t.y - s.y t.y t y s.y s y cos60 s.y s y kock(n-1, p1, s) kock n-1 n 1 p1 s print("{:.5f} {:.5f}".format(s.x, s.y)) print "{:.5f} {:.5f}".format(s.x, s.y) "{:.5f} {:.5f}".format "{:.5f} {:.5f}" format s.x s x s.y s y kock(n-1, s, u) kock n-1 n 1 s u print("{:.5f} {:.5f}".format(u.x, u.y)) print "{:.5f} {:.5f}".format(u.x, u.y) "{:.5f} {:.5f}".format "{:.5f} {:.5f}" format u.x u x u.y u y kock(n-1, u, t) kock n-1 n 1 u t print("{:.5f} {:.5f}".format(t.x, t.y)) print "{:.5f} {:.5f}".format(t.x, t.y) "{:.5f} {:.5f}".format "{:.5f} {:.5f}" format t.x t x t.y t y kock(n-1, t, p2) kock n-1 n 1 t p2 n n p1 p1 p2 p2 n = int(input()) n int(input()) int input() input p1, p2 = Pos(), Pos() p1 Pos() Pos p2 Pos() Pos p1.x, p1.y = 0.0, 0.0 p1.x p1 x 0.0 p1.y p1 y 0.0 p2.x, p2.y = 100.0, 0.0 p2.x p2 x 100.0 p2.y p2 y 0.0 print("{:.5f} {:.5f}".format(p1.x, p1.y)) print "{:.5f} {:.5f}".format(p1.x, p1.y) "{:.5f} {:.5f}".format "{:.5f} {:.5f}" format p1.x p1 x p1.y p1 y kock(n, p1, p2) kock n p1 p2 print("{:.5f} {:.5f}".format(p2.x, p2.y)) print "{:.5f} {:.5f}".format(p2.x, p2.y) "{:.5f} {:.5f}".format "{:.5f} {:.5f}" format p2.x p2 x p2.y p2 y p1, p2 = Pos(), Pos() Pos() p1 def kock(n, p1, p2):
  if n == 0: return

  s, t = Pos(), Pos()
  s.x = (2 * p1.x + 1 * p2.x) / 3
  s.y = (2 * p1.y + 1 * p2.y) / 3
  t.x = (1 * p1.x + 2 * p2.x) / 3
  t.y = (1 * p1.y + 2 * p2.y) / 3

  cos60 = math.cos(math.radians(60))
  sin60 = math.sin(math.radians(60))

  u = Pos()
  u.x = (t.x - s.x) * cos60 - (t.y - s.y) * sin60 + s.x
  u.y = (t.x - s.x) * sin60 + (t.y - s.y) * cos60 + s.y

  kock(n-1, p1, s)
  print("{:.5f} {:.5f}".format(s.x, s.y))
  kock(n-1, s, u)
  print("{:.5f} {:.5f}".format(u.x, u.y))
  kock(n-1, u, t)
  print("{:.5f} {:.5f}".format(t.x, t.y))
  kock(n-1, t, p2) def kock(n, p1, p2):
  if n == 0: return

  s, t = Pos(), Pos()
  s.x = (2 * p1.x + 1 * p2.x) / 3
  s.y = (2 * p1.y + 1 * p2.y) / 3
  t.x = (1 * p1.x + 2 * p2.x) / 3
  t.y = (1 * p1.y + 2 * p2.y) / 3

  cos60 = math.cos(math.radians(60))
  sin60 = math.sin(math.radians(60))

  u = Pos()
  u.x = (t.x - s.x) * cos60 - (t.y - s.y) * sin60 + s.x
  u.y = (t.x - s.x) * sin60 + (t.y - s.y) * cos60 + s.y

  kock(n-1, p1, s)
  print("{:.5f} {:.5f}".format(s.x, s.y))
  kock(n-1, s, u)
  print("{:.5f} {:.5f}".format(u.x, u.y))
  kock(n-1, u, t)
  print("{:.5f} {:.5f}".format(t.x, t.y))
  kock(n-1, t, p2) kock n = int(input()) int(input()) n class Pos:
  def init(x, y):
    self.x = x
    self.y = y class Pos:
  def init(x, y):
    self.x = x
    self.y = y Pos p2 = Pos(), Pos() Pos() p2
  
import math

class Pos:
  def init(x, y):
    self.x = x
    self.y = y

def kock(n, p1, p2):
  if n == 0: return

  s, t = Pos(), Pos()
  s.x = (2 * p1.x + 1 * p2.x) / 3
  s.y = (2 * p1.y + 1 * p2.y) / 3
  t.x = (1 * p1.x + 2 * p2.x) / 3
  t.y = (1 * p1.y + 2 * p2.y) / 3

  cos60 = math.cos(math.radians(60))
  sin60 = math.sin(math.radians(60))

  u = Pos()
  u.x = (t.x - s.x) * cos60 - (t.y - s.y) * sin60 + s.x
  u.y = (t.x - s.x) * sin60 + (t.y - s.y) * cos60 + s.y

  kock(n-1, p1, s)
  print("{:.5f} {:.5f}".format(s.x, s.y))
  kock(n-1, s, u)
  print("{:.5f} {:.5f}".format(u.x, u.y))
  kock(n-1, u, t)
  print("{:.5f} {:.5f}".format(t.x, t.y))
  kock(n-1, t, p2)

n = int(input())

p1, p2 = Pos(), Pos()
p1.x, p1.y = 0.0, 0.0
p2.x, p2.y = 100.0, 0.0

print("{:.5f} {:.5f}".format(p1.x, p1.y))
kock(n, p1, p2)
print("{:.5f} {:.5f}".format(p2.x, p2.y))
