t='ZABCDEFGHIJKLMNOPQRSTUVWXY' a,b,c=map(int,input().split()) e=[] for d in range(1,c+1): if d%a==0 or d%b==0: e.append(d) print(t[sum(e)%26])