import java.util.*;

public class PA
{
	public static final int MAX = 200;
	
	public static void main(String [] args)
	{
		Scanner in = new Scanner(System.in);
		int n, m, k;
		int [] a = new int[MAX];	// the switchboard
		n = in.nextInt();
		m = in.nextInt();
		k = in.nextInt();
		while (n != 0) {
			for(int i=0; i<n; i++) {	// put callers on switchboard
				a[i] = i+1;
			}
			int j=-1;
							// for k times...
			for(int i=0; i<k; i++) {
							//   .. skip through the
							//     next m callers who
							//     are still on the
							//     board
				int l=0;
				while (l<m) {
					j = (j+1)%n;	// wrap around if necessary
					if (a[j] > 0)
						l++;
				}
				a[j] = 0;		// take this caller off the board
			}
			System.out.println(j+1);
	
			n = in.nextInt();
			m = in.nextInt();
			k = in.nextInt();
		}
	}
}
