We can compare strings like numbers,
if "a" > "b":
do something
Solutions will be
Python:
first = max(name1, name2)
second = min(name1, name2)
Or if we are not supposed to use max() and min(), we can achieve the same thing with a conditional,
Python:
if name1 > name2: ...