arr = list(map(int,input().split()))
sorted_arr = sorted(list(set(arr)))
dic = {sorted_arr[i]:i for i in range(len(sorted_arr))}
pressed_arr = [0]*len(arr)
for i in range(len(arr)):
pressed_arr[i] = dic[arr[i]]
print(arr)
print(dic)
print(pressed_arr)