import math

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

	def __repr__(self):
		return "%.8f %.8f"%(self.x, self.y)


def koch(d, a, b):
	th = math.pi * 60.0 / 180.0
	if d == 0:
		return 0
	else:
		s = Point((2 * a.x + b.x) / 3.0, (2 * a.y + b.y) / 3.0)
		t = Point((a.x + 2 * b.x) / 3.0, (a.y + 2 * b.y) / 3.0)
		u = Point((t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x,
							(t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y)
		koch(d-1, a, s)
		print(s)
		koch(d-1, s, u)
		print(u)
		koch(d-1, u, t)
		print(t)
		koch(d-1, t, b)


if __name__ == "__main__":
	n = int(input())
	p1 = Point(0.0, 0.0)
	p2 = Point(100.0, 0.0)
	print(p1)
	koch(n, p1, p2)
	print(p2) import math math class Point():
	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __repr__(self):
		return "%.8f %.8f"%(self.x, self.y) Point def __init__(self, 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 self self x x y y def __repr__(self):
		return "%.8f %.8f"%(self.x, self.y) __repr__ return "%.8f %.8f"%(self.x, self.y) "%.8f %.8f"%(self.x, self.y) "%.8f %.8f" (self.x, self.y) self.x self x self.y self y self self def koch(d, a, b):
	th = math.pi * 60.0 / 180.0
	if d == 0:
		return 0
	else:
		s = Point((2 * a.x + b.x) / 3.0, (2 * a.y + b.y) / 3.0)
		t = Point((a.x + 2 * b.x) / 3.0, (a.y + 2 * b.y) / 3.0)
		u = Point((t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x,
							(t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y)
		koch(d-1, a, s)
		print(s)
		koch(d-1, s, u)
		print(u)
		koch(d-1, u, t)
		print(t)
		koch(d-1, t, b) koch th = math.pi * 60.0 / 180.0 th math.pi * 60.0 / 180.0 math.pi * 60.0 math.pi math pi 60.0 180.0 if d == 0:
		return 0
	else:
		s = Point((2 * a.x + b.x) / 3.0, (2 * a.y + b.y) / 3.0)
		t = Point((a.x + 2 * b.x) / 3.0, (a.y + 2 * b.y) / 3.0)
		u = Point((t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x,
							(t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y)
		koch(d-1, a, s)
		print(s)
		koch(d-1, s, u)
		print(u)
		koch(d-1, u, t)
		print(t)
		koch(d-1, t, b) d == 0 d 0 return 0 0 s = Point((2 * a.x + b.x) / 3.0, (2 * a.y + b.y) / 3.0) s Point((2 * a.x + b.x) / 3.0, (2 * a.y + b.y) / 3.0) Point (2 * a.x + b.x) / 3.0 2 * a.x + b.x 2 * a.x 2 a.x a x b.x b x 3.0 (2 * a.y + b.y) / 3.0 2 * a.y + b.y 2 * a.y 2 a.y a y b.y b y 3.0 t = Point((a.x + 2 * b.x) / 3.0, (a.y + 2 * b.y) / 3.0) t Point((a.x + 2 * b.x) / 3.0, (a.y + 2 * b.y) / 3.0) Point (a.x + 2 * b.x) / 3.0 a.x + 2 * b.x a.x a x 2 * b.x 2 b.x b x 3.0 (a.y + 2 * b.y) / 3.0 a.y + 2 * b.y a.y a y 2 * b.y 2 b.y b y 3.0 u = Point((t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x,
							(t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y) u Point((t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x,
							(t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y) Point (t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x (t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) (t.x - s.x) * math.cos(th) t.x - s.x t.x t x s.x s x math.cos(th) math.cos math cos th (t.y - s.y) * math.sin(th) t.y - s.y t.y t y s.y s y math.sin(th) math.sin math sin th s.x s x (t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y (t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) (t.x - s.x) * math.sin(th) t.x - s.x t.x t x s.x s x math.sin(th) math.sin math sin th (t.y - s.y) * math.cos(th) t.y - s.y t.y t y s.y s y math.cos(th) math.cos math cos th s.y s y koch(d-1, a, s) koch d-1 d 1 a s print(s) print s koch(d-1, s, u) koch d-1 d 1 s u print(u) print u koch(d-1, u, t) koch d-1 d 1 u t print(t) print t koch(d-1, t, b) koch d-1 d 1 t b d d a a b b if __name__ == "__main__":
	n = int(input())
	p1 = Point(0.0, 0.0)
	p2 = Point(100.0, 0.0)
	print(p1)
	koch(n, p1, p2)
	print(p2) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input p1 = Point(0.0, 0.0) p1 Point(0.0, 0.0) Point 0.0 0.0 p2 = Point(100.0, 0.0) p2 Point(100.0, 0.0) Point 100.0 0.0 print(p1) print p1 koch(n, p1, p2) koch n p1 p2 print(p2) print p2 p1 = Point(0.0, 0.0) Point(0.0, 0.0) p1 n = int(input()) int(input()) n def koch(d, a, b):
	th = math.pi * 60.0 / 180.0
	if d == 0:
		return 0
	else:
		s = Point((2 * a.x + b.x) / 3.0, (2 * a.y + b.y) / 3.0)
		t = Point((a.x + 2 * b.x) / 3.0, (a.y + 2 * b.y) / 3.0)
		u = Point((t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x,
							(t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y)
		koch(d-1, a, s)
		print(s)
		koch(d-1, s, u)
		print(u)
		koch(d-1, u, t)
		print(t)
		koch(d-1, t, b) def koch(d, a, b):
	th = math.pi * 60.0 / 180.0
	if d == 0:
		return 0
	else:
		s = Point((2 * a.x + b.x) / 3.0, (2 * a.y + b.y) / 3.0)
		t = Point((a.x + 2 * b.x) / 3.0, (a.y + 2 * b.y) / 3.0)
		u = Point((t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x,
							(t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y)
		koch(d-1, a, s)
		print(s)
		koch(d-1, s, u)
		print(u)
		koch(d-1, u, t)
		print(t)
		koch(d-1, t, b) koch p2 = Point(100.0, 0.0) Point(100.0, 0.0) p2 class Point():
	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __repr__(self):
		return "%.8f %.8f"%(self.x, self.y) class Point():
	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __repr__(self):
		return "%.8f %.8f"%(self.x, self.y) Point
import math

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

	def __repr__(self):
		return "%.8f %.8f"%(self.x, self.y)


def koch(d, a, b):
	th = math.pi * 60.0 / 180.0
	if d == 0:
		return 0
	else:
		s = Point((2 * a.x + b.x) / 3.0, (2 * a.y + b.y) / 3.0)
		t = Point((a.x + 2 * b.x) / 3.0, (a.y + 2 * b.y) / 3.0)
		u = Point((t.x - s.x) * math.cos(th) - (t.y - s.y) * math.sin(th) + s.x,
							(t.x - s.x) * math.sin(th) + (t.y - s.y) * math.cos(th) + s.y)
		koch(d-1, a, s)
		print(s)
		koch(d-1, s, u)
		print(u)
		koch(d-1, u, t)
		print(t)
		koch(d-1, t, b)


if __name__ == "__main__":
	n = int(input())
	p1 = Point(0.0, 0.0)
	p2 = Point(100.0, 0.0)
	print(p1)
	koch(n, p1, p2)
	print(p2)
