#include <iostream>
#include <vector>

using namespace std;

int main()
{
  int n, m, k;

  while(cin>>n>>k>>m && (n+m+k)){
    vector<int> vec;
    for(int i = 1; i <= n; i++){
      vec.push_back(i);
    }
    m--;
    k--;
    vec.erase(vec.begin()+(m%vec.size()));
    while(vec.size() > 1){
	m += k;
	m %= vec.size();
	vec.erase(vec.begin()+m);
    }
    
    cout << vec[0] << endl;
  }

  return 0;
}