#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <map>

int sz[13] = {0,100,100,100,100,100,100,1000,1000,1000,1000,1000,30000};
std::map<int, bool> chkx;
std::map<int, bool> chky;
std::map<int, bool> chkz;

int main()
{
    int st, ed, r = 1, c = 3;
    char in[110], out[110];
    scanf("%d%d", &st, &ed);
    srand(time(NULL));
    for(int i = st ; i <= ed ; i++ )
    {
        sprintf(in,".%d.in",i);
        freopen(in,"w",stdout);
        printf("%d\n", sz[i]);
        for(int j = 1 ; j <= sz[i] ; j++ )
        {
            int x, y, z;
            x = rand()*(rand()%2?1:-1);
            y = rand()*(rand()%2?1:-1);
            z = rand()*(rand()%2?1:-1);
            if( !chkx[x] && !chky[y] && !chkz[z] )
                printf("%d %d %d\n", x, y, z), chkx[x] = chky[y] = chkz[z] = true;
            else j--;
        }
        printf("%d\n", (i%6)?i%6:6);
    }
}
