from math import sqrt
from functools import reduce

N = int(input())

def koch(p1, p2, n):
	if n == 0:
		return [p1, p2]
	else:
		c1 = [(2*p1[0] + p2[0])/3, (2*p1[1] + p2[1])/3]
		c3 = [(p1[0] + 2*p2[0])/3, (p1[1] + 2*p2[1])/3]
		c2 = [(p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2, (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2]
		return koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] + koch(c3, p2, n-1)


for p in koch([0.0, 0.0], [100.0, 0.0], N):
	print('{:.6f} {:.6f}'.format(p[0], p[1]))
 from math import sqrt from functools import reduce N = int(input()) N int(input()) int input() input def koch(p1, p2, n):
	if n == 0:
		return [p1, p2]
	else:
		c1 = [(2*p1[0] + p2[0])/3, (2*p1[1] + p2[1])/3]
		c3 = [(p1[0] + 2*p2[0])/3, (p1[1] + 2*p2[1])/3]
		c2 = [(p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2, (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2]
		return koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] + koch(c3, p2, n-1) koch if n == 0:
		return [p1, p2]
	else:
		c1 = [(2*p1[0] + p2[0])/3, (2*p1[1] + p2[1])/3]
		c3 = [(p1[0] + 2*p2[0])/3, (p1[1] + 2*p2[1])/3]
		c2 = [(p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2, (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2]
		return koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] + koch(c3, p2, n-1) n == 0 n 0 return [p1, p2] [p1, p2] p1 p2 c1 = [(2*p1[0] + p2[0])/3, (2*p1[1] + p2[1])/3] c1 [(2*p1[0] + p2[0])/3, (2*p1[1] + p2[1])/3] (2*p1[0] + p2[0])/3 2*p1[0] + p2[0] 2*p1[0] 2 p1[0] p1 0 p2[0] p2 0 3 (2*p1[1] + p2[1])/3 2*p1[1] + p2[1] 2*p1[1] 2 p1[1] p1 1 p2[1] p2 1 3 c3 = [(p1[0] + 2*p2[0])/3, (p1[1] + 2*p2[1])/3] c3 [(p1[0] + 2*p2[0])/3, (p1[1] + 2*p2[1])/3] (p1[0] + 2*p2[0])/3 p1[0] + 2*p2[0] p1[0] p1 0 2*p2[0] 2 p2[0] p2 0 3 (p1[1] + 2*p2[1])/3 p1[1] + 2*p2[1] p1[1] p1 1 2*p2[1] 2 p2[1] p2 1 3 c2 = [(p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2, (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2] c2 [(p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2, (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2] (p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2 (p1[0] + p2[0]) / 2 p1[0] + p2[0] p1[0] p1 0 p2[0] p2 0 2 1/sqrt(3) * (p1[1] - p2[1])/2 1/sqrt(3) * (p1[1] - p2[1]) 1/sqrt(3) 1 sqrt(3) sqrt 3 p1[1] - p2[1] p1[1] p1 1 p2[1] p2 1 2 (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2 (p1[1] + p2[1]) / 2 p1[1] + p2[1] p1[1] p1 1 p2[1] p2 1 2 1/sqrt(3) * (p2[0] - p1[0])/2 1/sqrt(3) * (p2[0] - p1[0]) 1/sqrt(3) 1 sqrt(3) sqrt 3 p2[0] - p1[0] p2[0] p2 0 p1[0] p1 0 2 return koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] + koch(c3, p2, n-1) koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] + koch(c3, p2, n-1) koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] koch(p1, c1, n-1)[:-1] (p1, c1, n-1) koch p1 c1 n-1 n 1 :-1 -1 koch(c1, c2, n-1)[:-1] (c1, c2, n-1) koch c1 c2 n-1 n 1 :-1 -1 koch(c2, c3, n-1)[:-1] (c2, c3, n-1) koch c2 c3 n-1 n 1 :-1 -1 koch(c3, p2, n-1) koch c3 p2 n-1 n 1 p1 p1 p2 p2 n n for p in koch([0.0, 0.0], [100.0, 0.0], N):
	print('{:.6f} {:.6f}'.format(p[0], p[1])) p koch([0.0, 0.0], [100.0, 0.0], N) koch [0.0, 0.0] 0.0 0.0 [100.0, 0.0] 100.0 0.0 N print('{:.6f} {:.6f}'.format(p[0], p[1])) print '{:.6f} {:.6f}'.format(p[0], p[1]) '{:.6f} {:.6f}'.format '{:.6f} {:.6f}' format p[0] p 0 p[1] p 1 N = int(input()) int(input()) N def koch(p1, p2, n):
	if n == 0:
		return [p1, p2]
	else:
		c1 = [(2*p1[0] + p2[0])/3, (2*p1[1] + p2[1])/3]
		c3 = [(p1[0] + 2*p2[0])/3, (p1[1] + 2*p2[1])/3]
		c2 = [(p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2, (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2]
		return koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] + koch(c3, p2, n-1) def koch(p1, p2, n):
	if n == 0:
		return [p1, p2]
	else:
		c1 = [(2*p1[0] + p2[0])/3, (2*p1[1] + p2[1])/3]
		c3 = [(p1[0] + 2*p2[0])/3, (p1[1] + 2*p2[1])/3]
		c2 = [(p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2, (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2]
		return koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] + koch(c3, p2, n-1) koch
from math import sqrt
from functools import reduce

N = int(input())

def koch(p1, p2, n):
	if n == 0:
		return [p1, p2]
	else:
		c1 = [(2*p1[0] + p2[0])/3, (2*p1[1] + p2[1])/3]
		c3 = [(p1[0] + 2*p2[0])/3, (p1[1] + 2*p2[1])/3]
		c2 = [(p1[0] + p2[0]) / 2 + 1/sqrt(3) * (p1[1] - p2[1])/2, (p1[1] + p2[1]) / 2 + 1/sqrt(3) * (p2[0] - p1[0])/2]
		return koch(p1, c1, n-1)[:-1] + koch(c1, c2, n-1)[:-1] + koch(c2, c3, n-1)[:-1] + koch(c3, p2, n-1)


for p in koch([0.0, 0.0], [100.0, 0.0], N):
	print('{:.6f} {:.6f}'.format(p[0], p[1]))

