#include <stdio.h>
#include <stdlib.h>    
#include <math.h>    
void kock(int,double,double,double,double);

    int main()
    {
        int n,k;
        double ret;
        double p1x = 0;
        double p1y = 0;
        double p2x = 100;
        double p2y = 0;
        scanf("%d %d",&n,&k);
        printf("%f %f?\n",p1x,p1y);
        kock(n,p1x,p1y,p2x,p2y);
        printf("%f %f?\n",p2x,p2y);


        return 0;
    }

    void kock(int n,double p1x,double p1y,double p2x,double p2y){
        double sx,sy,tx,ty,ux,uy;
        double rad = 60;
        if(n==0) return;

        else{
            sx =(2*p1x + 1*p2x)/3;
            sy =(2*p1y + 1*p2y)/3;
            tx =(1*p1x + 2*p2x)/3;
            ty =(1*p1y + 2*p2y)/3;
            ux =(tx-sx)*cos(rad) - (ty-sy)*sin(rad)+sx;
            ux =(tx-sx)*sin(rad) + (ty-sy)*cos(rad)+sy;

            kock(n-1, p1x,p1y,sx,sy);
            printf("%f %f?\n",sx,sy);
            kock(n-1, sx,sy,ux,uy);
            printf("%f %f?\n",ux,uy);
            kock(n-1, ux,uy,tx,ty);
            printf("%f %f?\n",tx,ty);
            kock(n-1, tx,ty,p2x,p2y);

        }


    }