#include<bits/stdc++.h>
using namespace std;
vector<int> V;
int main()
{
int n, M, K;
scanf("%d%d%d", &n, &M, &K);
for (int i = 1; i <= n; i++) V.push_back(i);
int now = 0, next; //index
int luck;
for (int i = 0; i < K; i++)
{
int m = (M-1) % V.size() + 1;
next = (now + m - 1) % V.size();
V.erase(V.begin() + next);
if (next == V.size()) now = 0;
else now = next;
luck = V[now];
}
printf("%d\n", luck);
}