// AOJ 1275
#include<iostream>
#include<vector>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;

int solve(int n, int k, int m) {
  vector<int> v(n);
  REP(i,n) { v[i] = i; }
  
  int rem = 0;
  REP(i, n-1) {
    v.erase(v.begin()+rem);
    rem = (rem + k - 1) % v.size();
  }
  return (v[0] + m - 1) % n + 1;
}

int main() {
  int n, k, m;
  while (cin >> n >> k >> m and n * k * m) {
    cout << solve(n, k, m) << endl;
  }
}