import heapq
from collections import deque
from enum import Enum
import sys
import math
from _heapq import heappush, heappop

#------------------------------------------#

BIG_NUM = 2000000000
HUGE_NUM = 9999999999999999
MOD = 1000000007
EPS = 0.000000001


def MIN(A,B):
    if A <= B:
        return A
    else:
        return B

def MAX(A,B):
    if A >= B:
        return A
    else:
        return B

#------------------------------------------#

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


def roll(div1,div2):
    tmp_start = Point(div2.x-div1.x,div2.y-div1.y)
    tmp_end = Point(tmp_start.x*math.cos(math.pi/3) -tmp_start.y*math.sin(math.pi/3),
                    tmp_start.x*math.sin(math.pi/3) + tmp_start.y*math.cos(math.pi/3))
    ret = Point(tmp_end.x + div1.x,tmp_end.y + div1.y)
    return ret;


def outPut(point):
    print("%.8f %.8f"%(point.x,point.y))


def calc(left,right,count):
    div1 = Point((2*left.x + right.x)/3,(2*left.y + right.y)/3)
    div2 = Point((2*right.x + left.x)/3,(2*right.y + left.y)/3)
    peek = roll(div1,div2)

    if count > 1:
        calc(left,div1,count-1)
        calc(div1,peek,count-1)
        calc(peek,div2,count-1)
        calc(div2,right,count-1)
    else:
        outPut(left);
        outPut(div1);
        outPut(peek);
        outPut(div2);


N = int(input())
left = Point(0,0)
right = Point(100,0)

if N == 0:
    outPut(left)
    outPut(right)
else:
    calc(left,right,N)
    outPut(right)

 import heapq heapq from collections import deque from enum import Enum import sys sys import math math from _heapq import heappush, heappop BIG_NUM = 2000000000 BIG_NUM 2000000000 HUGE_NUM = 9999999999999999 HUGE_NUM 9999999999999999 MOD = 1000000007 MOD 1000000007 EPS = 0.000000001 EPS 0.000000001 def MIN(A,B):
    if A <= B:
        return A
    else:
        return B MIN if A <= B:
        return A
    else:
        return B A <= B A B return A A return B B A A B B def MAX(A,B):
    if A >= B:
        return A
    else:
        return B

#------------------------------------------# MAX if A >= B:
        return A
    else:
        return B

#------------------------------------------# A >= B A B return A A return B B A A B B class Point:
    def __init__(self,arg_x,arg_y):
        self.x = arg_x
        self.y = arg_y Point def __init__(self,arg_x,arg_y):
        self.x = arg_x
        self.y = arg_y __init__ self.x = arg_x self.x self x arg_x self.y = arg_y self.y self y arg_y self self arg_x arg_x arg_y arg_y def roll(div1,div2):
    tmp_start = Point(div2.x-div1.x,div2.y-div1.y)
    tmp_end = Point(tmp_start.x*math.cos(math.pi/3) -tmp_start.y*math.sin(math.pi/3),
                    tmp_start.x*math.sin(math.pi/3) + tmp_start.y*math.cos(math.pi/3))
    ret = Point(tmp_end.x + div1.x,tmp_end.y + div1.y)
    return ret; roll tmp_start = Point(div2.x-div1.x,div2.y-div1.y) tmp_start Point(div2.x-div1.x,div2.y-div1.y) Point div2.x-div1.x div2.x div2 x div1.x div1 x div2.y-div1.y div2.y div2 y div1.y div1 y tmp_end = Point(tmp_start.x*math.cos(math.pi/3) -tmp_start.y*math.sin(math.pi/3),
                    tmp_start.x*math.sin(math.pi/3) + tmp_start.y*math.cos(math.pi/3)) tmp_end Point(tmp_start.x*math.cos(math.pi/3) -tmp_start.y*math.sin(math.pi/3),
                    tmp_start.x*math.sin(math.pi/3) + tmp_start.y*math.cos(math.pi/3)) Point tmp_start.x*math.cos(math.pi/3) -tmp_start.y*math.sin(math.pi/3) tmp_start.x*math.cos(math.pi/3) tmp_start.x tmp_start x math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 tmp_start.y*math.sin(math.pi/3) tmp_start.y tmp_start y math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 tmp_start.x*math.sin(math.pi/3) + tmp_start.y*math.cos(math.pi/3) tmp_start.x*math.sin(math.pi/3) tmp_start.x tmp_start x math.sin(math.pi/3) math.sin math sin math.pi/3 math.pi math pi 3 tmp_start.y*math.cos(math.pi/3) tmp_start.y tmp_start y math.cos(math.pi/3) math.cos math cos math.pi/3 math.pi math pi 3 ret = Point(tmp_end.x + div1.x,tmp_end.y + div1.y) ret Point(tmp_end.x + div1.x,tmp_end.y + div1.y) Point tmp_end.x + div1.x tmp_end.x tmp_end x div1.x div1 x tmp_end.y + div1.y tmp_end.y tmp_end y div1.y div1 y return ret ret div1 div1 div2 div2 def outPut(point):
    print("%.8f %.8f"%(point.x,point.y)) outPut print("%.8f %.8f"%(point.x,point.y)) print "%.8f %.8f"%(point.x,point.y) "%.8f %.8f" (point.x,point.y) point.x point x point.y point y point point def calc(left,right,count):
    div1 = Point((2*left.x + right.x)/3,(2*left.y + right.y)/3)
    div2 = Point((2*right.x + left.x)/3,(2*right.y + left.y)/3)
    peek = roll(div1,div2)

    if count > 1:
        calc(left,div1,count-1)
        calc(div1,peek,count-1)
        calc(peek,div2,count-1)
        calc(div2,right,count-1)
    else:
        outPut(left);
        outPut(div1);
        outPut(peek);
        outPut(div2); calc div1 = Point((2*left.x + right.x)/3,(2*left.y + right.y)/3) div1 Point((2*left.x + right.x)/3,(2*left.y + right.y)/3) Point (2*left.x + right.x)/3 2*left.x + right.x 2*left.x 2 left.x left x right.x right x 3 (2*left.y + right.y)/3 2*left.y + right.y 2*left.y 2 left.y left y right.y right y 3 div2 = Point((2*right.x + left.x)/3,(2*right.y + left.y)/3) div2 Point((2*right.x + left.x)/3,(2*right.y + left.y)/3) Point (2*right.x + left.x)/3 2*right.x + left.x 2*right.x 2 right.x right x left.x left x 3 (2*right.y + left.y)/3 2*right.y + left.y 2*right.y 2 right.y right y left.y left y 3 peek = roll(div1,div2) peek roll(div1,div2) roll div1 div2 if count > 1:
        calc(left,div1,count-1)
        calc(div1,peek,count-1)
        calc(peek,div2,count-1)
        calc(div2,right,count-1)
    else:
        outPut(left);
        outPut(div1);
        outPut(peek);
        outPut(div2); count > 1 count 1 calc(left,div1,count-1) calc left div1 count-1 count 1 calc(div1,peek,count-1) calc div1 peek count-1 count 1 calc(peek,div2,count-1) calc peek div2 count-1 count 1 calc(div2,right,count-1) calc div2 right count-1 count 1 outPut(left) outPut left outPut(div1) outPut div1 outPut(peek) outPut peek outPut(div2) outPut div2 left left right right count count N = int(input()) N int(input()) int input() input left = Point(0,0) left Point(0,0) Point 0 0 right = Point(100,0) right Point(100,0) Point 100 0 if N == 0:
    outPut(left)
    outPut(right)
else:
    calc(left,right,N)
    outPut(right) N == 0 N 0 outPut(left) outPut left outPut(right) outPut right calc(left,right,N) calc left right N outPut(right) outPut right left = Point(0,0) Point(0,0) left def outPut(point):
    print("%.8f %.8f"%(point.x,point.y)) def outPut(point):
    print("%.8f %.8f"%(point.x,point.y)) outPut BIG_NUM = 2000000000 2000000000 BIG_NUM def MIN(A,B):
    if A <= B:
        return A
    else:
        return B def MIN(A,B):
    if A <= B:
        return A
    else:
        return B MIN right = Point(100,0) Point(100,0) right def MAX(A,B):
    if A >= B:
        return A
    else:
        return B

#------------------------------------------# def MAX(A,B):
    if A >= B:
        return A
    else:
        return B

#------------------------------------------# MAX MOD = 1000000007 1000000007 MOD N = int(input()) int(input()) N def roll(div1,div2):
    tmp_start = Point(div2.x-div1.x,div2.y-div1.y)
    tmp_end = Point(tmp_start.x*math.cos(math.pi/3) -tmp_start.y*math.sin(math.pi/3),
                    tmp_start.x*math.sin(math.pi/3) + tmp_start.y*math.cos(math.pi/3))
    ret = Point(tmp_end.x + div1.x,tmp_end.y + div1.y)
    return ret; def roll(div1,div2):
    tmp_start = Point(div2.x-div1.x,div2.y-div1.y)
    tmp_end = Point(tmp_start.x*math.cos(math.pi/3) -tmp_start.y*math.sin(math.pi/3),
                    tmp_start.x*math.sin(math.pi/3) + tmp_start.y*math.cos(math.pi/3))
    ret = Point(tmp_end.x + div1.x,tmp_end.y + div1.y)
    return ret; roll EPS = 0.000000001 0.000000001 EPS class Point:
    def __init__(self,arg_x,arg_y):
        self.x = arg_x
        self.y = arg_y class Point:
    def __init__(self,arg_x,arg_y):
        self.x = arg_x
        self.y = arg_y Point def calc(left,right,count):
    div1 = Point((2*left.x + right.x)/3,(2*left.y + right.y)/3)
    div2 = Point((2*right.x + left.x)/3,(2*right.y + left.y)/3)
    peek = roll(div1,div2)

    if count > 1:
        calc(left,div1,count-1)
        calc(div1,peek,count-1)
        calc(peek,div2,count-1)
        calc(div2,right,count-1)
    else:
        outPut(left);
        outPut(div1);
        outPut(peek);
        outPut(div2); def calc(left,right,count):
    div1 = Point((2*left.x + right.x)/3,(2*left.y + right.y)/3)
    div2 = Point((2*right.x + left.x)/3,(2*right.y + left.y)/3)
    peek = roll(div1,div2)

    if count > 1:
        calc(left,div1,count-1)
        calc(div1,peek,count-1)
        calc(peek,div2,count-1)
        calc(div2,right,count-1)
    else:
        outPut(left);
        outPut(div1);
        outPut(peek);
        outPut(div2); calc HUGE_NUM = 9999999999999999 9999999999999999 HUGE_NUM
import heapq
from collections import deque
from enum import Enum
import sys
import math
from _heapq import heappush, heappop

#------------------------------------------#

BIG_NUM = 2000000000
HUGE_NUM = 9999999999999999
MOD = 1000000007
EPS = 0.000000001


def MIN(A,B):
    if A <= B:
        return A
    else:
        return B

def MAX(A,B):
    if A >= B:
        return A
    else:
        return B

#------------------------------------------#

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


def roll(div1,div2):
    tmp_start = Point(div2.x-div1.x,div2.y-div1.y)
    tmp_end = Point(tmp_start.x*math.cos(math.pi/3) -tmp_start.y*math.sin(math.pi/3),
                    tmp_start.x*math.sin(math.pi/3) + tmp_start.y*math.cos(math.pi/3))
    ret = Point(tmp_end.x + div1.x,tmp_end.y + div1.y)
    return ret;


def outPut(point):
    print("%.8f %.8f"%(point.x,point.y))


def calc(left,right,count):
    div1 = Point((2*left.x + right.x)/3,(2*left.y + right.y)/3)
    div2 = Point((2*right.x + left.x)/3,(2*right.y + left.y)/3)
    peek = roll(div1,div2)

    if count > 1:
        calc(left,div1,count-1)
        calc(div1,peek,count-1)
        calc(peek,div2,count-1)
        calc(div2,right,count-1)
    else:
        outPut(left);
        outPut(div1);
        outPut(peek);
        outPut(div2);


N = int(input())
left = Point(0,0)
right = Point(100,0)

if N == 0:
    outPut(left)
    outPut(right)
else:
    calc(left,right,N)
    outPut(right)


