import math

def koch_curve(p1_x,p1_y,p2_x,p2_y,c):
	s_x = (p2_x + 2*p1_x) / 3
	s_y = (p2_y + 2*p1_y) / 3
	t_x = (2*p2_x + p1_x) / 3
	t_y = (2*p2_y + p1_y) / 3
	u_x = (math.cos(math.pi/3) * ( t_x - s_x ) - math.sin(math.pi/3) * ( t_y - s_y)) + s_x
	u_y = (math.sin(math.pi/3) * ( t_x - s_x ) + math.cos(math.pi/3) * ( t_y - s_y)) + s_y
	if c > 1:
		koch_curve(p1_x,p1_y,s_x,s_y,c-1)
		koch_curve(s_x,s_y,u_x,u_y,c-1)
		koch_curve(u_x,u_y,t_x,t_y,c-1)
		koch_curve(t_x,t_y,p2_x,p2_y,c-1)
	else:
		print("%.8f %.8f" % (p1_x,p1_y))
		print("%.8f %.8f" % (s_x, s_y))
		print("%.8f %.8f" % (u_x, u_y))
		print("%.8f %.8f" % (t_x, t_y))

if __name__ == '__main__':
	n = int(input())
	if n == 0:
		print("%.8f %.8f" % (0,0))
		print("%.8f %.8f" % (100,0))
	else:
		koch_curve(0,0,100,0,n)
		print("%.8f %.8f" % (100,0)) import math math def koch_curve(p1_x,p1_y,p2_x,p2_y,c):
	s_x = (p2_x + 2*p1_x) / 3
	s_y = (p2_y + 2*p1_y) / 3
	t_x = (2*p2_x + p1_x) / 3
	t_y = (2*p2_y + p1_y) / 3
	u_x = (math.cos(math.pi/3) * ( t_x - s_x ) - math.sin(math.pi/3) * ( t_y - s_y)) + s_x
	u_y = (math.sin(math.pi/3) * ( t_x - s_x ) + math.cos(math.pi/3) * ( t_y - s_y)) + s_y
	if c > 1:
		koch_curve(p1_x,p1_y,s_x,s_y,c-1)
		koch_curve(s_x,s_y,u_x,u_y,c-1)
		koch_curve(u_x,u_y,t_x,t_y,c-1)
		koch_curve(t_x,t_y,p2_x,p2_y,c-1)
	else:
		print("%.8f %.8f" % (p1_x,p1_y))
		print("%.8f %.8f" % (s_x, s_y))
		print("%.8f %.8f" % (u_x, u_y))
		print("%.8f %.8f" % (t_x, t_y)) koch_curve s_x = (p2_x + 2*p1_x) / 3 s_x (p2_x + 2*p1_x) / 3 p2_x + 2*p1_x p2_x 2*p1_x 2 p1_x 3 s_y = (p2_y + 2*p1_y) / 3 s_y (p2_y + 2*p1_y) / 3 p2_y + 2*p1_y p2_y 2*p1_y 2 p1_y 3 t_x = (2*p2_x + p1_x) / 3 t_x (2*p2_x + p1_x) / 3 2*p2_x + p1_x 2*p2_x 2 p2_x p1_x 3 t_y = (2*p2_y + p1_y) / 3 t_y (2*p2_y + p1_y) / 3 2*p2_y + p1_y 2*p2_y 2 p2_y p1_y 3 u_x = (math.cos(math.pi/3) * ( t_x - s_x ) - math.sin(math.pi/3) * ( t_y - s_y)) + s_x u_x (math.cos(math.pi/3) * ( t_x - s_x ) - math.sin(math.pi/3) * ( t_y - s_y)) + s_x math.cos(math.pi/3) * ( t_x - s_x ) - math.sin(math.pi/3) * ( t_y - s_y) math.cos(math.pi/3) * ( t_x - s_x ) math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 t_x - s_x t_x s_x math.sin(math.pi/3) * ( t_y - s_y) math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 t_y - s_y t_y s_y s_x u_y = (math.sin(math.pi/3) * ( t_x - s_x ) + math.cos(math.pi/3) * ( t_y - s_y)) + s_y u_y (math.sin(math.pi/3) * ( t_x - s_x ) + math.cos(math.pi/3) * ( t_y - s_y)) + s_y math.sin(math.pi/3) * ( t_x - s_x ) + math.cos(math.pi/3) * ( t_y - s_y) math.sin(math.pi/3) * ( t_x - s_x ) math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 t_x - s_x t_x s_x math.cos(math.pi/3) * ( t_y - s_y) math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 t_y - s_y t_y s_y s_y if c > 1:
		koch_curve(p1_x,p1_y,s_x,s_y,c-1)
		koch_curve(s_x,s_y,u_x,u_y,c-1)
		koch_curve(u_x,u_y,t_x,t_y,c-1)
		koch_curve(t_x,t_y,p2_x,p2_y,c-1)
	else:
		print("%.8f %.8f" % (p1_x,p1_y))
		print("%.8f %.8f" % (s_x, s_y))
		print("%.8f %.8f" % (u_x, u_y))
		print("%.8f %.8f" % (t_x, t_y)) c > 1 c 1 koch_curve(p1_x,p1_y,s_x,s_y,c-1) koch_curve p1_x p1_y s_x s_y c-1 c 1 koch_curve(s_x,s_y,u_x,u_y,c-1) koch_curve s_x s_y u_x u_y c-1 c 1 koch_curve(u_x,u_y,t_x,t_y,c-1) koch_curve u_x u_y t_x t_y c-1 c 1 koch_curve(t_x,t_y,p2_x,p2_y,c-1) koch_curve t_x t_y p2_x p2_y c-1 c 1 print("%.8f %.8f" % (p1_x,p1_y)) print "%.8f %.8f" % (p1_x,p1_y) "%.8f %.8f" (p1_x,p1_y) p1_x p1_y print("%.8f %.8f" % (s_x, s_y)) print "%.8f %.8f" % (s_x, s_y) "%.8f %.8f" (s_x, s_y) s_x s_y print("%.8f %.8f" % (u_x, u_y)) print "%.8f %.8f" % (u_x, u_y) "%.8f %.8f" (u_x, u_y) u_x u_y print("%.8f %.8f" % (t_x, t_y)) print "%.8f %.8f" % (t_x, t_y) "%.8f %.8f" (t_x, t_y) t_x t_y p1_x p1_x p1_y p1_y p2_x p2_x p2_y p2_y c c if __name__ == '__main__':
	n = int(input())
	if n == 0:
		print("%.8f %.8f" % (0,0))
		print("%.8f %.8f" % (100,0))
	else:
		koch_curve(0,0,100,0,n)
		print("%.8f %.8f" % (100,0)) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input if n == 0:
		print("%.8f %.8f" % (0,0))
		print("%.8f %.8f" % (100,0))
	else:
		koch_curve(0,0,100,0,n)
		print("%.8f %.8f" % (100,0)) n == 0 n 0 print("%.8f %.8f" % (0,0)) print "%.8f %.8f" % (0,0) "%.8f %.8f" (0,0) 0 0 print("%.8f %.8f" % (100,0)) print "%.8f %.8f" % (100,0) "%.8f %.8f" (100,0) 100 0 koch_curve(0,0,100,0,n) koch_curve 0 0 100 0 n print("%.8f %.8f" % (100,0)) print "%.8f %.8f" % (100,0) "%.8f %.8f" (100,0) 100 0 n = int(input()) int(input()) n def koch_curve(p1_x,p1_y,p2_x,p2_y,c):
	s_x = (p2_x + 2*p1_x) / 3
	s_y = (p2_y + 2*p1_y) / 3
	t_x = (2*p2_x + p1_x) / 3
	t_y = (2*p2_y + p1_y) / 3
	u_x = (math.cos(math.pi/3) * ( t_x - s_x ) - math.sin(math.pi/3) * ( t_y - s_y)) + s_x
	u_y = (math.sin(math.pi/3) * ( t_x - s_x ) + math.cos(math.pi/3) * ( t_y - s_y)) + s_y
	if c > 1:
		koch_curve(p1_x,p1_y,s_x,s_y,c-1)
		koch_curve(s_x,s_y,u_x,u_y,c-1)
		koch_curve(u_x,u_y,t_x,t_y,c-1)
		koch_curve(t_x,t_y,p2_x,p2_y,c-1)
	else:
		print("%.8f %.8f" % (p1_x,p1_y))
		print("%.8f %.8f" % (s_x, s_y))
		print("%.8f %.8f" % (u_x, u_y))
		print("%.8f %.8f" % (t_x, t_y)) def koch_curve(p1_x,p1_y,p2_x,p2_y,c):
	s_x = (p2_x + 2*p1_x) / 3
	s_y = (p2_y + 2*p1_y) / 3
	t_x = (2*p2_x + p1_x) / 3
	t_y = (2*p2_y + p1_y) / 3
	u_x = (math.cos(math.pi/3) * ( t_x - s_x ) - math.sin(math.pi/3) * ( t_y - s_y)) + s_x
	u_y = (math.sin(math.pi/3) * ( t_x - s_x ) + math.cos(math.pi/3) * ( t_y - s_y)) + s_y
	if c > 1:
		koch_curve(p1_x,p1_y,s_x,s_y,c-1)
		koch_curve(s_x,s_y,u_x,u_y,c-1)
		koch_curve(u_x,u_y,t_x,t_y,c-1)
		koch_curve(t_x,t_y,p2_x,p2_y,c-1)
	else:
		print("%.8f %.8f" % (p1_x,p1_y))
		print("%.8f %.8f" % (s_x, s_y))
		print("%.8f %.8f" % (u_x, u_y))
		print("%.8f %.8f" % (t_x, t_y)) koch_curve
import math

def koch_curve(p1_x,p1_y,p2_x,p2_y,c):
	s_x = (p2_x + 2*p1_x) / 3
	s_y = (p2_y + 2*p1_y) / 3
	t_x = (2*p2_x + p1_x) / 3
	t_y = (2*p2_y + p1_y) / 3
	u_x = (math.cos(math.pi/3) * ( t_x - s_x ) - math.sin(math.pi/3) * ( t_y - s_y)) + s_x
	u_y = (math.sin(math.pi/3) * ( t_x - s_x ) + math.cos(math.pi/3) * ( t_y - s_y)) + s_y
	if c > 1:
		koch_curve(p1_x,p1_y,s_x,s_y,c-1)
		koch_curve(s_x,s_y,u_x,u_y,c-1)
		koch_curve(u_x,u_y,t_x,t_y,c-1)
		koch_curve(t_x,t_y,p2_x,p2_y,c-1)
	else:
		print("%.8f %.8f" % (p1_x,p1_y))
		print("%.8f %.8f" % (s_x, s_y))
		print("%.8f %.8f" % (u_x, u_y))
		print("%.8f %.8f" % (t_x, t_y))

if __name__ == '__main__':
	n = int(input())
	if n == 0:
		print("%.8f %.8f" % (0,0))
		print("%.8f %.8f" % (100,0))
	else:
		koch_curve(0,0,100,0,n)
		print("%.8f %.8f" % (100,0))
