import math
SIN_T = math.sin(math.pi / 3)
COS_T = math.cos(math.pi / 3)


def koch(p0, p4):
    p1 = ((p0[0]*2 + p4[0])/3, (p0[1]*2 + p4[1])/3)
    p3 = ((p0[0] + p4[0]*2)/3, (p0[1] + p4[1]*2)/3)
    p2 = (COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) + p1[0],
          SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) + p1[1])

    return [p1, p2, p3, p4]


if __name__ == "__main__":
    n = int(input())
    points = [(0, 0), (100, 0)]

    for _ in [0]*n:
        _points = [points[0]]
        for origin, dest in zip(points, points[1:]):
            _points += koch(origin, dest)

        points = _points

    for p in points:
        print(*p) import math math SIN_T = math.sin(math.pi / 3) SIN_T math.sin(math.pi / 3) math.sin math sin math.pi / 3 math.pi math pi 3 COS_T = math.cos(math.pi / 3) COS_T math.cos(math.pi / 3) math.cos math cos math.pi / 3 math.pi math pi 3 def koch(p0, p4):
    p1 = ((p0[0]*2 + p4[0])/3, (p0[1]*2 + p4[1])/3)
    p3 = ((p0[0] + p4[0]*2)/3, (p0[1] + p4[1]*2)/3)
    p2 = (COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) + p1[0],
          SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) + p1[1])

    return [p1, p2, p3, p4] koch p1 = ((p0[0]*2 + p4[0])/3, (p0[1]*2 + p4[1])/3) p1 ((p0[0]*2 + p4[0])/3, (p0[1]*2 + p4[1])/3) (p0[0]*2 + p4[0])/3 p0[0]*2 + p4[0] p0[0]*2 p0[0] p0 0 2 p4[0] p4 0 3 (p0[1]*2 + p4[1])/3 p0[1]*2 + p4[1] p0[1]*2 p0[1] p0 1 2 p4[1] p4 1 3 p3 = ((p0[0] + p4[0]*2)/3, (p0[1] + p4[1]*2)/3) p3 ((p0[0] + p4[0]*2)/3, (p0[1] + p4[1]*2)/3) (p0[0] + p4[0]*2)/3 p0[0] + p4[0]*2 p0[0] p0 0 p4[0]*2 p4[0] p4 0 2 3 (p0[1] + p4[1]*2)/3 p0[1] + p4[1]*2 p0[1] p0 1 p4[1]*2 p4[1] p4 1 2 3 p2 = (COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) + p1[0],
          SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) + p1[1]) p2 (COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) + p1[0],
          SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) + p1[1]) COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) + p1[0] COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) COS_T*(p3[0]-p1[0]) COS_T p3[0]-p1[0] p3[0] p3 0 p1[0] p1 0 -SIN_T*(p3[1]-p1[1]) -SIN_T SIN_T p3[1]-p1[1] p3[1] p3 1 p1[1] p1 1 p1[0] p1 0 SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) + p1[1] SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) SIN_T*(p3[0]-p1[0]) SIN_T p3[0]-p1[0] p3[0] p3 0 p1[0] p1 0 COS_T*(p3[1]-p1[1]) COS_T p3[1]-p1[1] p3[1] p3 1 p1[1] p1 1 p1[1] p1 1 return [p1, p2, p3, p4] [p1, p2, p3, p4] p1 p2 p3 p4 p0 p0 p4 p4 if __name__ == "__main__":
    n = int(input())
    points = [(0, 0), (100, 0)]

    for _ in [0]*n:
        _points = [points[0]]
        for origin, dest in zip(points, points[1:]):
            _points += koch(origin, dest)

        points = _points

    for p in points:
        print(*p) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input points = [(0, 0), (100, 0)] points [(0, 0), (100, 0)] (0, 0) 0 0 (100, 0) 100 0 for _ in [0]*n:
        _points = [points[0]]
        for origin, dest in zip(points, points[1:]):
            _points += koch(origin, dest)

        points = _points

     _ [0]*n [0] 0 n _points = [points[0]] _points [points[0]] points[0] points 0 for origin, dest in zip(points, points[1:]):
            _points += koch(origin, dest)

         origin dest zip(points, points[1:]) zip points points[1:] points 1: 1 _points += koch(origin, dest) _points koch(origin, dest) koch origin dest points = _points points _points for p in points:
        print(*p) p points print(*p) print *p p _points += koch(origin, dest) koch(origin, dest) _points points = _points _points points COS_T = math.cos(math.pi / 3) math.cos(math.pi / 3) COS_T points = [(0, 0), (100, 0)] [(0, 0), (100, 0)] points def koch(p0, p4):
    p1 = ((p0[0]*2 + p4[0])/3, (p0[1]*2 + p4[1])/3)
    p3 = ((p0[0] + p4[0]*2)/3, (p0[1] + p4[1]*2)/3)
    p2 = (COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) + p1[0],
          SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) + p1[1])

    return [p1, p2, p3, p4] def koch(p0, p4):
    p1 = ((p0[0]*2 + p4[0])/3, (p0[1]*2 + p4[1])/3)
    p3 = ((p0[0] + p4[0]*2)/3, (p0[1] + p4[1]*2)/3)
    p2 = (COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) + p1[0],
          SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) + p1[1])

    return [p1, p2, p3, p4] koch SIN_T = math.sin(math.pi / 3) math.sin(math.pi / 3) SIN_T n = int(input()) int(input()) n _points = [points[0]] [points[0]] _points
import math
SIN_T = math.sin(math.pi / 3)
COS_T = math.cos(math.pi / 3)


def koch(p0, p4):
    p1 = ((p0[0]*2 + p4[0])/3, (p0[1]*2 + p4[1])/3)
    p3 = ((p0[0] + p4[0]*2)/3, (p0[1] + p4[1]*2)/3)
    p2 = (COS_T*(p3[0]-p1[0]) + -SIN_T*(p3[1]-p1[1]) + p1[0],
          SIN_T*(p3[0]-p1[0]) + COS_T*(p3[1]-p1[1]) + p1[1])

    return [p1, p2, p3, p4]


if __name__ == "__main__":
    n = int(input())
    points = [(0, 0), (100, 0)]

    for _ in [0]*n:
        _points = [points[0]]
        for origin, dest in zip(points, points[1:]):
            _points += koch(origin, dest)

        points = _points

    for p in points:
        print(*p)
