#include<stdio.h>
int main()
{
int n,m;
while(scanf("%d%d",&m,&n)!=EOF)
{
if(m%(n+1)==0)
{
printf("none\n");
continue;
}
if(m<=n)
{
printf("%d",m);
for(int i=m+1;i<=n;i++)
printf(" %d",i);
printf("\n");
continue;
}
printf("%d\n",m%(n+1));
}
return 0;
}