Skip to main content
1 of 7

Python3: 123 bytes

N=sorted(map(int,input().split(' ')));print(''.join((''if n+1in N else'-'+str(n))if n-1in N else' '+str(n)for n in N)[1:])