while True:
try:
n,m,k=map(int,input().split())
def ch(d):
b=[]
c=[]
d=[]
b=a[m:len(a)]
c=a[0:m-1]
d=b+c
return d
a=[]
for i in range(1,n+1):
a.append(i)
n=0
while n<k:
a=ch(a)
n=n+1
print(a[0])
except:
break