x = int(input())
if x == 1:
    suffix = 'st'
elif x == 2:
    suffix = 'nd'
elif x == 3:
    suffix = 'rd'
else:
    suffix = 'th'
print('{number}{suffix}'.format(number=x, suffix=suffix))
Python Logic - Simplify/more efficient multiple if elif statements