#include <stdio.h>
#include<string.h>
int main(void) {
int t,c,i,len,l,j,k,flag,x;
char msg[200];
//if(t<=1||t>=20) return 0 ; // constraint 1
while(t--){
// if(c<=2||c>=20) continue ; // constraint 2
//if(len>200)continue; // constraint 3
/* for(i=0;i<len-1;i++){
msg[i]=tolower(msg[i]);
}*/
//if(len<c) continue ;
//msg[len]='\0';
l=1;
j=0;
k=0;
k++;
for(i=c;i>0;i--){
flag=1;
x=j;
while(x<len){
if(flag==1){
x+=(i*2-1);
flag=0;
}
else{
x+=l;
flag=1;
}
}
l+=2;
j++;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlPHN0cmluZy5oPgppbnQgbWFpbih2b2lkKSB7CglpbnQgdCxjLGksbGVuLGwsaixrLGZsYWcseDsKICAgIGNoYXIgbXNnWzIwMF07CiAgICBzY2FuZigiJWQiLCZ0KTsKICAgIC8vaWYodDw9MXx8dD49MjApIHJldHVybiAwIDsgIC8vICBjb25zdHJhaW50IDEKICAgIHdoaWxlKHQtLSl7CiAgICAgICAgc2NhbmYoIiVkIiwmYyk7CiAgICAgICAgCiAgICAgICAgc2NhbmYoIiVzIixtc2cpOwogICAgICAgIAogICAgICAgLy8gaWYoYzw9Mnx8Yz49MjApIGNvbnRpbnVlIDsgICAvLyAgY29uc3RyYWludCAyCiAgICAgICAgbGVuPXN0cmxlbihtc2cpOwogICAgICAgLy9pZihsZW4+MjAwKWNvbnRpbnVlOyAgICAgICAgIC8vIGNvbnN0cmFpbnQgMwogICAgICAgLyogZm9yKGk9MDtpPGxlbi0xO2krKyl7CiAgICAgICAgICAgIG1zZ1tpXT10b2xvd2VyKG1zZ1tpXSk7CiAgICAgICAgfSovCiAgICAgICAgCiAgICAgICAgLy9pZihsZW48YykgY29udGludWUgOwogICAgICAgIC8vbXNnW2xlbl09J1wwJzsKICAgICAgICBsPTE7CiAgICAgICAgaj0wOwogICAgICAgIGs9MDsKICAgICAgICAKICAgICAgICAKICAgICAgICAKICAgICAgICBrKys7CiAgICAgICAgZm9yKGk9YztpPjA7aS0tKXsKICAgICAgICAgICAgZmxhZz0xOwogICAgICAgICAgICB4PWo7CiAgICAgICAgCiAgICAgICAgICAgIHdoaWxlKHg8bGVuKXsKICAgICAgICAgICAgICAgIHByaW50ZigiJWMiLG1zZ1t4XSk7CiAgICAgICAgICAgICAgICBpZihmbGFnPT0xKXsKICAgICAgICAgICAgICAgICAgICB4Kz0oaSoyLTEpOwogICAgICAgIAogICAgICAgIAogICAgICAgIAogICAgICAgICAgICAgICAgICAgIGZsYWc9MDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2V7CiAgICAgICAgICAgICAgICAgICAgeCs9bDsKICAgICAgICAKICAgICAgICAKICAgICAgICAKICAgICAgICAgICAgICAgICAgICBmbGFnPTE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgCiAgICAgICAgICAgIAogICAgICAgICAgICBsKz0yOwogICAgICAgICAgICBqKys7CiAgICAgICAgICAgIAogICAgICAgIH0KICAgICAgICBwcmludGYoIlxuIik7CiAgICAgICAgCiAgICB9CglyZXR1cm4gMDsKfQ==