print(*filter(lambda x: x > 0, reversed([x ** 2 if x > 0 else x for x in list(map(int, input().split()))])))