#include <cstdio>
using namespace std;
int main(void)
{
freopen("cheat.in","r",stdin);
freopen("cheat.out","w",stdout);
int i,n,k,p,m,c=0,pos,temp;
bool used[100001]={true},hash[100001]={false};
scanf("%d %d %d",&n,&k,&p);
m=k/n;
pos=0;
while (m)
{
pos++;
if (pos>k)
pos=1;
while (used[pos])
{
pos++;
if (pos>k)
pos=1;
}
used[pos]=true;
c++;
if (c==n)
{
hash[pos]=true;
m--;
c=0;
}
temp=p;
while (m&&temp)
{
pos++;
if (pos>k)
pos=1;
if (!used[pos])
temp--;
}
}
for (i=1;i<=100000;i++)
if (hash[i])
printf("%d\n",i);
fclose(stdin);
fclose(stdout);
return(0);
}