multiplier = int(input())
array = []
n = 1
counter = 0;
while n > 0:
n = int(input())
array.append(multiplier * n)
counter = counter + 1
for i in range(0, counter):
print('Великан ' + str(array[i]%10))
multiplier = int(input())
array = []
n = 1
counter = 0;
while n > 0:
n = int(input())
array.append(multiplier * n)
counter = counter + 1
for i in range(0, counter):
print('Великан ' + str(array[i]%10))