/* 
   AOJ 1275
   And Then There Was One

*/

#include<stdio.h>
#include<string.h>
#define NUM_MAX 10000


int main(void)
{
  int n, k, m, num[NUM_MAX], i, j;
  while(1)
    {
      memset(num, 1, sizeof(num));
      scanf("%d %d %d", &n, &k, &m);
      if(n == 0 && k == 0 && m == 0)break;

      for(i = 0; i < n - 1; i++)
	{
	  num[m % n] = 0;
	  for(j = 0; j < k; j++)
	    {
	      m = (m + 1) % n;
	      if(!num[m])
		{
		  j--;
		}
	    }
	}
      for(i = 0; i < n; i++)
	{
	  if(num[i])
	    {
	      if(i == 0)
		{
		  printf("%d\n", n);
		}
	      else
		{
		  printf("%d\n", i);
		}
	    }
	}
    }
  return 0;
}