#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>

using namespace std;

int n, k, m;

int main(void){
    while (cin >> n >> k >> m, n | k | m) {
        vector<int> v;
        for (int i = 0; i < n; i++) v.push_back(i+1);
        int idx = (m-1) % n;
        v.erase(v.begin() + idx);
        //for (int i = 0; i < v.size(); i++) cout << v[i];cout <<endl;
        
        for (int i = 0; i < n-2; i++) {
            idx = (idx + (k-1)) % (n-1-i);
            v.erase(v.begin() + idx);
            //for (int i = 0; i < v.size(); i++) cout << v[i];cout<<endl;
        }
        cout << v[0] << endl;
    }
    return 0;
}