import math
th = math.pi/3

def koch(p2, n, points):
	p1 = points[-1]
	x, y = p2[0]-p1[0], p2[1]-p1[1]
	s = [p1[0]+x/3, p1[1]+y/3]
	t = [p1[0]+x*2/3, p1[1]+y*2/3]
	s0t = [t[0]-s[0], t[1]-s[1]]
	s0u = [math.cos(th)*s0t[0] - math.sin(th)*s0t[1],
	       math.sin(th)*s0t[0] + math.cos(th)*s0t[1]]
	u = [s[0]+s0u[0], s[1]+s0u[1]]
	
	if n == 0:
		points.append(p2)
	else:
		koch(s, n-1, points)
		koch(u, n-1, points)
		koch(t, n-1, points)
		koch(p2, n-1, points)


if __name__ == '__main__':
	n = int(input())
	p1 = [0.0, 0.0]
	p2 = [100.0, 0.0]
	points = [p1]
	koch(p2, n, points)
	[print(*p) for p in points] import math math th = math.pi/3 th math.pi/3 math.pi math pi 3 def koch(p2, n, points):
	p1 = points[-1]
	x, y = p2[0]-p1[0], p2[1]-p1[1]
	s = [p1[0]+x/3, p1[1]+y/3]
	t = [p1[0]+x*2/3, p1[1]+y*2/3]
	s0t = [t[0]-s[0], t[1]-s[1]]
	s0u = [math.cos(th)*s0t[0] - math.sin(th)*s0t[1],
	       math.sin(th)*s0t[0] + math.cos(th)*s0t[1]]
	u = [s[0]+s0u[0], s[1]+s0u[1]]
	
	if n == 0:
		points.append(p2)
	else:
		koch(s, n-1, points)
		koch(u, n-1, points)
		koch(t, n-1, points)
		koch(p2, n-1, points) koch p1 = points[-1] p1 points[-1] points -1 x, y = p2[0]-p1[0], p2[1]-p1[1] x p2[0]-p1[0] p2[0] p2 0 p1[0] p1 0 y p2[1]-p1[1] p2[1] p2 1 p1[1] p1 1 s = [p1[0]+x/3, p1[1]+y/3] s [p1[0]+x/3, p1[1]+y/3] p1[0]+x/3 p1[0] p1 0 x/3 x 3 p1[1]+y/3 p1[1] p1 1 y/3 y 3 t = [p1[0]+x*2/3, p1[1]+y*2/3] t [p1[0]+x*2/3, p1[1]+y*2/3] p1[0]+x*2/3 p1[0] p1 0 x*2/3 x*2 x 2 3 p1[1]+y*2/3 p1[1] p1 1 y*2/3 y*2 y 2 3 s0t = [t[0]-s[0], t[1]-s[1]] s0t [t[0]-s[0], t[1]-s[1]] t[0]-s[0] t[0] t 0 s[0] s 0 t[1]-s[1] t[1] t 1 s[1] s 1 s0u = [math.cos(th)*s0t[0] - math.sin(th)*s0t[1],
	       math.sin(th)*s0t[0] + math.cos(th)*s0t[1]] s0u [math.cos(th)*s0t[0] - math.sin(th)*s0t[1],
	       math.sin(th)*s0t[0] + math.cos(th)*s0t[1]] math.cos(th)*s0t[0] - math.sin(th)*s0t[1] math.cos(th)*s0t[0] math.cos(th) math.cos math cos th s0t[0] s0t 0 math.sin(th)*s0t[1] math.sin(th) math.sin math sin th s0t[1] s0t 1 math.sin(th)*s0t[0] + math.cos(th)*s0t[1] math.sin(th)*s0t[0] math.sin(th) math.sin math sin th s0t[0] s0t 0 math.cos(th)*s0t[1] math.cos(th) math.cos math cos th s0t[1] s0t 1 u = [s[0]+s0u[0], s[1]+s0u[1]] u [s[0]+s0u[0], s[1]+s0u[1]] s[0]+s0u[0] s[0] s 0 s0u[0] s0u 0 s[1]+s0u[1] s[1] s 1 s0u[1] s0u 1 if n == 0:
		points.append(p2)
	else:
		koch(s, n-1, points)
		koch(u, n-1, points)
		koch(t, n-1, points)
		koch(p2, n-1, points) n == 0 n 0 points.append(p2) points.append points append p2 koch(s, n-1, points) koch s n-1 n 1 points koch(u, n-1, points) koch u n-1 n 1 points koch(t, n-1, points) koch t n-1 n 1 points koch(p2, n-1, points) koch p2 n-1 n 1 points p2 p2 n n points points if __name__ == '__main__':
	n = int(input())
	p1 = [0.0, 0.0]
	p2 = [100.0, 0.0]
	points = [p1]
	koch(p2, n, points)
	[print(*p) for p in points] __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input p1 = [0.0, 0.0] p1 [0.0, 0.0] 0.0 0.0 p2 = [100.0, 0.0] p2 [100.0, 0.0] 100.0 0.0 points = [p1] points [p1] p1 koch(p2, n, points) koch p2 n points print(*p) for p in points for p in points p points for p in points print(*p) print *p p [print(*p) for p in points] def koch(p2, n, points):
	p1 = points[-1]
	x, y = p2[0]-p1[0], p2[1]-p1[1]
	s = [p1[0]+x/3, p1[1]+y/3]
	t = [p1[0]+x*2/3, p1[1]+y*2/3]
	s0t = [t[0]-s[0], t[1]-s[1]]
	s0u = [math.cos(th)*s0t[0] - math.sin(th)*s0t[1],
	       math.sin(th)*s0t[0] + math.cos(th)*s0t[1]]
	u = [s[0]+s0u[0], s[1]+s0u[1]]
	
	if n == 0:
		points.append(p2)
	else:
		koch(s, n-1, points)
		koch(u, n-1, points)
		koch(t, n-1, points)
		koch(p2, n-1, points) def koch(p2, n, points):
	p1 = points[-1]
	x, y = p2[0]-p1[0], p2[1]-p1[1]
	s = [p1[0]+x/3, p1[1]+y/3]
	t = [p1[0]+x*2/3, p1[1]+y*2/3]
	s0t = [t[0]-s[0], t[1]-s[1]]
	s0u = [math.cos(th)*s0t[0] - math.sin(th)*s0t[1],
	       math.sin(th)*s0t[0] + math.cos(th)*s0t[1]]
	u = [s[0]+s0u[0], s[1]+s0u[1]]
	
	if n == 0:
		points.append(p2)
	else:
		koch(s, n-1, points)
		koch(u, n-1, points)
		koch(t, n-1, points)
		koch(p2, n-1, points) koch n = int(input()) int(input()) n p1 = [0.0, 0.0] [0.0, 0.0] p1 th = math.pi/3 math.pi/3 th p2 = [100.0, 0.0] [100.0, 0.0] p2 points = [p1] [p1] points
import math
th = math.pi/3

def koch(p2, n, points):
	p1 = points[-1]
	x, y = p2[0]-p1[0], p2[1]-p1[1]
	s = [p1[0]+x/3, p1[1]+y/3]
	t = [p1[0]+x*2/3, p1[1]+y*2/3]
	s0t = [t[0]-s[0], t[1]-s[1]]
	s0u = [math.cos(th)*s0t[0] - math.sin(th)*s0t[1],
	       math.sin(th)*s0t[0] + math.cos(th)*s0t[1]]
	u = [s[0]+s0u[0], s[1]+s0u[1]]
	
	if n == 0:
		points.append(p2)
	else:
		koch(s, n-1, points)
		koch(u, n-1, points)
		koch(t, n-1, points)
		koch(p2, n-1, points)


if __name__ == '__main__':
	n = int(input())
	p1 = [0.0, 0.0]
	p2 = [100.0, 0.0]
	points = [p1]
	koch(p2, n, points)
	[print(*p) for p in points]