while 1:

   x, y = list(map(int, input().split()))

   if x == 0 and y == 0:

      break

   else:

      if x > y:

         print('%s %s' % (y,x))

      else:

         print('%s %s' % (x,y))

     
while 1:

   x, y = list(map(int, input().split()))

   if x == 0 and y == 0:

      break

   elif x > y:

      print('%s %s' % (y,x))

   else:

      print('%s %s' % (x,y))

     
while 1:
    x, y = list(map(int, input().split()))
    if x == 0 and y == 0:
        break
    else:
        if x > y:
            print("%s %s" % (y, x))
        else:
            print("%s %s" % (x, y))

while 1:
    x, y = list(map(int, input().split()))
    if x == 0 and y == 0:
        break
    elif x > y:
        print("%s %s" % (y, x))
    else:
        print("%s %s" % (x, y))

+    elif x > y: +        print("%s %s" % (y, x)) -        if x > y: -            print("%s %s" % (y, x)) -        else: -            print("%s %s" % (x, y)) +        print("%s %s" % (x, y))