ZhenlongDai/ACPR huggingface dataset:
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):


def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    if x > y:
        x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        swap_two_numbers_asc(x, y)
        if x == 0 and y == 0:
            break
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

Failing test case input:
4 3
3 5
-2 6
0 0

Expected output:
3 4
3 5
-2 6


Actual output:
4 3
3 5
-2 6


Fixed submission (verdict: Accepted):


def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = swap_two_numbers_asc(x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a > b:
        print(f"b a")
    else:
        print(f"a b")



Failing test case input:
0 2
3 6
5 6
0 0

Expected output:
0 2
3 6
5 6


Actual output:
a b
a b
a b


Fixed submission (verdict: Accepted):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a > b:
        print(f'{b} {a}')
    else:
        print(f'{a} {b}')

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
c = 0
while True:
    a = input().split(' ')
    x = int(a[0])
    y = int(a[1])

    if (x and y) == 0:
        break;
    elif x < y:
        print(x,y)
    elif x > y:
        print(y,x)
    elif x == y:
        print(x,y)
    c += 1

Failing test case input:
5 0
2 1
9 3
0 0

Expected output:
0 5
1 2
3 9


Actual output:

Fixed submission (verdict: Accepted):
c = 0
while True:
    a = input().split(' ')
    x = int(a[0])
    y = int(a[1])

    if (x or y) == 0:
        break;
    elif x < y:
        print(x,y)
    elif x > y:
        print(y,x)
    elif x == y:
        print(x,y)
    c += 1

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
for _ in range(3000):
	x,y = map(int,input().split(" "))

	if (x != 0 and y != 0):
		if x > y:
			print(y,x)
		elif  x < y:
			print(x,y)
		else:
			print(x,y)
	else:
		break



Failing test case input:
8 2
1 0
0 6
0 0

Expected output:
2 8
0 1
0 6


Actual output:
2 8


Fixed submission (verdict: Accepted):
while True:
	x,y = map(int,input().split(" "))

	if (x == 0 and y == 0):
		break
	else:
		if x > y:
			print(y,x)
		elif  x < y:
			print(x,y)
		else:
			print(x,y)
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
import sys

n = sys.stdin.readlines()
for i in n:
    a = [int(x) for x in i.split()]
    if a[0] == a[1]:
        break
    print(*sorted(a))

Failing test case input:
1 1
2 3
9 3
0 0

Expected output:
1 1
2 3
3 9


Actual output:

Fixed submission (verdict: Accepted):
import sys

n = sys.stdin.readlines()
for i in n:
    a = [int(x) for x in i.split()]
    if a[0] == 0 and a[1] == 0:
        break
    print(*sorted(a))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while(True):
    a, b = map(int, input().split())
    if(a == b == 0):
        break
    print('{} {}'.format(b, a))



Failing test case input:
1 1
1 3
9 3
0 0

Expected output:
1 1
1 3
3 9


Actual output:
1 1
3 1
3 9


Fixed submission (verdict: Accepted):
while(True):
    a, b = map(int, input().split())
    if(a == b == 0):
        break
    print('{} {}'.format(min(a, b), max(a, b)))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
def sort_two_numbers(a, b): 
    
    result = []
    
    if a < b:
        result.append(a)
        result.append(b)
    else:
        result.append(b)
        result.append(a)

    return result

if __name__ == '__main__':



    while True:
        try:
            (a, b) = input().split(' ')
            print('{0[0]} {0[1]}'.format(sort_two_numbers(int(a), int(b))))
        except EOFError:
            break

Failing test case input:
3 0
-1 2
15 3
0 0

Expected output:
0 3
-1 2
3 15


Actual output:
0 3
-1 2
3 15
0 0


Fixed submission (verdict: Accepted):
def sort_two_numbers(a, b):
    
    result = []
    
    if a < b:
        result.append(a)
        result.append(b)
    else:
        result.append(b)
        result.append(a)

    return result

if __name__ == '__main__':



    while True:
        try:
            (a, b) = [int(i) for i in input().split(' ')]
            if a == 0 and b == 0:
                break
            print('{0[0]} {0[1]}'.format(sort_two_numbers(int(a), int(b))))
        except EOFError:
            break

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
	x,y = map(int,input().split())
	if x == 0 and y == 0:
		break
		
	if x >= y:
		print(y,x)
	else:
		print(y,x)

Failing test case input:
3 1
0 1
0 1
0 0

Expected output:
1 3
0 1
0 1


Actual output:
1 3
1 0
1 0


Fixed submission (verdict: Accepted):
while True:
	x,y = map(int,input().split())
	if x == 0 and y == 0:
		break
		
	if x >= y:
		print(y,x)
	else:
		print(x,y)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
l = []
while True:
    N, M = map(int, input().split())
    if (N == 0 and M == 0):
        break;
    if (N > M):
        l.append([M, N])
    elif (N < M):
        l.append([N, M])

for i in l:
    print("{} {}".format(i[0], i[1]))

Failing test case input:
1 1
2 3
9 3
0 0

Expected output:
1 1
2 3
3 9


Actual output:
2 3
3 9


Fixed submission (verdict: Accepted):
l = []
while True:
    N, M = map(int, input().split())
    if (N == 0 and M == 0):
        break;
    if (N > M):
        N, M = M, N
    l.append([N, M])

for i in l:
    print("{} {}".format(i[0], i[1]))
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a,b = [int(i) for i in input().split()]
    if a<b:
        print(str(a) + " " + str(b))
    else:
        print(str(b) + " " + str(a))
    if a == 0 and b==0:
        break


Failing test case input:
3 2
2 2
5 6
0 0

Expected output:
2 3
2 2
5 6


Actual output:
2 3
2 2
5 6
0 0


Fixed submission (verdict: Accepted):
while True:
    x,y = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    if x>y:
        print(str(y) + " " + str(x))
    else:
        print(str(x) + " " + str(y))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
import sys

while(True):
    x,y = map(int, sys.stdin.readline().split())
    if x==0 and y==0 :
        break
    elif x<y :
        print(x,y)
    elif x>y :
        print(y,x)

Failing test case input:
1 1
1 3
9 3
0 0

Expected output:
1 1
1 3
3 9


Actual output:
1 3
3 9


Fixed submission (verdict: Accepted):
import sys

while(True):
    x,y = map(int, sys.stdin.readline().split())
    if x==0 and y==0 :
        break
    elif x<=y :
        print(x,y)
    elif x>y :
        print(y,x)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0: break
    print(b, a)




Failing test case input:
2 0
0 3
0 0
2 0

Expected output:
0 2
0 3


Actual output:
0 2
3 0


Fixed submission (verdict: Accepted):
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0: break
    if a > b:
        print(b, a)
    else:
        print(a, b)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while 1:
  n,m=map(int,input().split())
  if n==0 and m==0:
    break
  print(m,n)


Failing test case input:
3 0
-1 2
5 5
0 0

Expected output:
0 3
-1 2
5 5


Actual output:
0 3
2 -1
5 5


Fixed submission (verdict: Accepted):
while 1:
  n,m=map(int,input().split())
  if n==0 and m==0:
    break
  if n<m:
    print(n,m)
  else:
    print(m,n)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
import sys


def main():
    while True:
        x, y = [int(i) for i in sys.stdin.readline().split(' ')]
        if x == 0 & y == 0:
            break
        elif x <= y:
            print(x, y)
        else:
            print(y, x)
    return


if __name__ == '__main__':
    main()



Failing test case input:
3 -1
0 2
27 3
0 0

Expected output:
-1 3
0 2
3 27


Actual output:
-1 3


Fixed submission (verdict: Accepted):
import sys


def main():
    while True:
        x, y = [int(i) for i in sys.stdin.readline().split(' ')]
        if x == 0 and y == 0:
            break
        elif x <= y:
            print(x, y)
        else:
            print(y, x)


if __name__ == '__main__':
    main()
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
n = []
while (True):
	x = input().split()
	if int(x[0]) == 0 and int(x[1]) == 0:
		break
	n.append(x)
for i in n:
	if i[0] > i[1]:
		print(int(i[1]), int(i[0]))
	else:
		print(int(i[0]), int(i[1]))

Failing test case input:
3 -1
0 2
27 3
0 0

Expected output:
-1 3
0 2
3 27


Actual output:
-1 3
0 2
27 3


Fixed submission (verdict: Accepted):

n = []
while (True):
	x = list(map(int,input().split()))
	if x[0] == 0 and x[1] == 0:
		break
	n.append(x)
for i in n:
	if i[0] > i[1]:
		print(i[1], i[0])
	else:
		print(i[0], i[1])

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    x, y = map(int, input().split())
    if x == 0 and y == 0:
        break
    if x < y:
        print(x, y)
    elif x > y:
        print(y, x)

Failing test case input:
7 2
1 1
1 6
0 0

Expected output:
2 7
1 1
1 6


Actual output:
2 7
1 6


Fixed submission (verdict: Accepted):
import sys

while True:
    x, y = map(int, sys.stdin.readline().split())
    if (x == 0 )and (y == 0):
        break

    if x < y:
        print(x, y)
    else:
        print(y, x)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    x, y = map(int, input().split(" "))
    if x == 0 and y == 0:
        break
 
    print(x, y)

Failing test case input:
4 -1
0 2
18 5
0 0

Expected output:
-1 4
0 2
5 18


Actual output:
4 -1
0 2
18 5


Fixed submission (verdict: Accepted):

while True:
    x, y = map(int, input().split(" "))
    if x == 0 and y == 0:
     break
    elif x <=  y:
     print(x, y)
    elif x >= y:
     print(y, x)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while 1:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    print(b, a)


Failing test case input:
3 0
0 2
5 2
0 0

Expected output:
0 3
0 2
2 5


Actual output:
0 3
2 0
2 5


Fixed submission (verdict: Accepted):
while 1:
    a = list(map(int, input().split()))
    if a[0] or a[1]:
        print(min(a), max(a))
    else:
        break

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    (x, y) = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    if x >= y :
        print(x, y)
    else:
        print(x, y)

Failing test case input:
3 1
0 2
9 3
0 0

Expected output:
1 3
0 2
3 9


Actual output:
3 1
0 2
9 3


Fixed submission (verdict: Accepted):
while True:
    (x, y) = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    if x >= y :
        print(y, x)
    else:
        print(x, y)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
data = [int(x) for x in input().split()]
while(data[0] != 0 and data[1] != 0):
    data.sort()
    print(data[0], data[1])
    data = [int(x) for x in input().split()]

Failing test case input:
3 0
2 1
9 3
0 0

Expected output:
0 3
1 2
3 9


Actual output:

Fixed submission (verdict: Accepted):
data = [int(x) for x in input().split()]
while(not(data[0] == 0 and data[1] == 0)):
    data.sort()
    print(data[0], data[1])
    data = [int(x) for x in input().split()]
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
dataset = []
while True:
    x, y = map(int, input().split())
    if not((x >= 0 and x <= 10000) and (y >= 0 and y <= 10000)):
        break
    elif (x is not 0) and (y is not 0): 
        listed = []
        listed.append(x)
        listed.append(y)
        dataset.append(listed)
        if len(dataset) > 3000:
            break
    else:
        break

for i in dataset:
    min = i[0]
    max = i[0]
    if i[0] > i[1]:
        min = i[1]
        max = i[0]
    elif i[0] < i[1]:
        min = i[0]
        max = i[1]
    print("{0} {1}".format(str(min), str(max)))

Failing test case input:
2 1
1 0
2 3
0 0

Expected output:
1 2
0 1
2 3


Actual output:
1 2


Fixed submission (verdict: Accepted):
dataset = []
while True:
    x, y = map(int, input().split())
    if (x < 0 and x > 10000) and (y < 0 and y > 10000):
        break
    elif (x is 0) and (y is 0): 
        break

    listed = []
    listed.append(x)
    listed.append(y)
    dataset.append(listed)
    if len(dataset) >= 3000:
        break

for i in dataset:
    if i[0] > i[1]:
        print("{0} {1}".format(str(i[1]), str(i[0])))
    elif i[0] < i[1]:
        print("{0} {1}".format(str(i[0]), str(i[1])))
    else:
        print("{0} {1}".format(str(i[0]), str(i[1])))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while(True):
    i,j=input().split()
    a,b=int(i),int(j)
    if a != 0 and b != 0:
        if i <= j:
            print('{} {}'.format(i,j))
        else:
            print('{} {}'.format(j,i))
    else:
        break


Failing test case input:
3 0
0 2
0 1
0 0

Expected output:
0 3
0 2
0 1


Actual output:

Fixed submission (verdict: Accepted):
while(True):
    i,j=input().split()
    
    if i != '0' or j != '0':
        if int(i) <= int(j):
            print('{} {}'.format(i,j))
        else:
            print('{} {}'.format(j,i))
    else:
        break

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
import sys
while True:
    a, b = sys.stdin.readline().strip().split()
    if a == b == '0':
        break
    print(b, a)

Failing test case input:
3 0
-1 2
0 3
0 0

Expected output:
0 3
-1 2
0 3


Actual output:
0 3
2 -1
3 0


Fixed submission (verdict: Accepted):
import sys

for s in sys.stdin:
    a, b = sorted(map(int, s.split()))
    if a == b == 0:
        break
    print(a, b)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0: break
    print("{} {}".format(a, b if a < b else b, a))

Failing test case input:
4 -1
0 2
18 3
0 0

Expected output:
-1 4
0 2
3 18


Actual output:
4 -1
0 2
18 3


Fixed submission (verdict: Accepted):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    if a < b:
        print(a, b)
    else:
        print(b, a)
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True :
    a, b = input().split()
    if a == b == "0" : break
    elif a >= b :
        print(b, a)
    else : print(a,b)

Failing test case input:
3 0
0 2
27 3
0 0

Expected output:
0 3
0 2
3 27


Actual output:
0 3
0 2
27 3


Fixed submission (verdict: Accepted):
while True :
    a, b = [int(i) for i in input().split()]
    if a == b == 0 : break
    elif a >= b :
        print(b, a)
    else : print(a,b)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(x,y))

Failing test case input:
4 -1
0 2
18 5
0 0

Expected output:
-1 4
0 2
5 18


Actual output:
4 -1
0 2
18 5


Fixed submission (verdict: Accepted):
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(min(x,y),max(x,y)))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
def ex(x, y):
    if x < y:
        tmp = x
        x = y
        y = tmp
    return x,y

def ex2num():
    tmp = input().split(" ")
    print (tmp[0], tmp[1])
    while ('0' != tmp[0]) and ('0' != tmp[1]):
        r1, r2 = ex(tmp[0], tmp[1])
        print (r1, r2)
        tmp = input().split(" ")

    return 0

if __name__ == "__main__":
    ret = ex2num()


Failing test case input:
3 2
-1 4
0 1
0 0

Expected output:
2 3
-1 4
0 1


Actual output:
3 2
3 2
4 -1


Fixed submission (verdict: Accepted):
def ex(x, y):
    if x > y:
        tmp = x
        x = y
        y = tmp

    return x, y

def ex2num():
    r1, r2 = input().split(" ")
    r1 = int(r1)
    r2 = int(r2)
    while (0 != r1) or (0 != r2):
        r1, r2 = ex(r1, r2)
        print(r1, r2)
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)

    return 0

if __name__ == "__main__":
    ret = ex2num()

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(3000):
  y,x=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(x,y))

Failing test case input:
1 1
2 3
9 3
0 0

Expected output:
1 1
2 3
3 9


Actual output:
1 1
3 2
3 9


Fixed submission (verdict: Accepted):
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(min(x,y),max(x,y)))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
import sys
for i in sys.stdin:
    a, b = sorted(map(int, i.split()))
    if a != 0 and b != 0:
        print(a, b)
    else:
        break

Failing test case input:
3 0
-1 2
0 1
0 0

Expected output:
0 3
-1 2
0 1


Actual output:

Fixed submission (verdict: Accepted):
import sys
for i in sys.stdin:
    a, b = sorted(map(int, i.split()))
    if a != 0 or b != 0:
        print(a, b)
    else:
        break
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
def ex(x, y):
    if x < y:
        tmp = x
        x = y
        y = tmp
    return x,y

def ex2num():
    tmp = input().split(" ")
    while ('0' != tmp[0]) and ('0' != tmp[1]):
        r1, r2 = ex(tmp[0], tmp[1])
        print (r1, r2)
        tmp = input().split(" ")

    return 0

if __name__ == "__main__":
    ret = ex2num()


Failing test case input:
3 1
2 2
9 3
0 0

Expected output:
1 3
2 2
3 9


Actual output:
3 1
2 2
9 3


Fixed submission (verdict: Accepted):
def ex(x, y):
    if x > y:
        tmp = x
        x = y
        y = tmp

    return x, y

def ex2num():
    r1, r2 = input().split(" ")
    r1 = int(r1)
    r2 = int(r2)
    while (0 != r1) or (0 != r2):
        r1, r2 = ex(r1, r2)
        print(r1, r2)
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)

    return 0

if __name__ == "__main__":
    ret = ex2num()

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a, b = map(int, input().split())
    if a > b:
        print(a, b)
    elif a < b:
        print(b, a)
    elif a == 0 and b == 0:
        break

Failing test case input:
2 1
4 3
4 3
0 0

Expected output:
1 2
3 4
3 4


Actual output:
2 1
4 3
4 3


Fixed submission (verdict: Accepted):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a > b or a == b:
        print(b, a)
    elif a < b:
        print(a, b)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):

while True:
    a, b = map(int, input().split())
    
    if a == 0 & b == 0:
        break
    
    if a > b:
        print(b, a)
    else:
        print(a, b)


Failing test case input:
3 1
-1 3
0 1
0 0

Expected output:
1 3
-1 3
0 1


Actual output:
1 3
-1 3


Fixed submission (verdict: Accepted):

while True:
    a, b = map(int, input().split())
    
    if (a == 0) & (b == 0):
        break
    
    if a < b:
        print(a, b)
    else:
        print(b, a)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    x,y = [int(i) for i in input().split()]
    if x<y:
        print(str(x) + " " + str(y))
    else:
        print(str(y) + " " + str(x))
    if x == 0 and y == 0:
        break


Failing test case input:
3 0
0 2
9 3
0 0

Expected output:
0 3
0 2
3 9


Actual output:
0 3
0 2
3 9
0 0


Fixed submission (verdict: Accepted):
while True:
    x,y = [int(i) for i in input().split()]
    if x == 0 and y == 0:
        break
    if x>y:
        print(str(y) + " " + str(x))
    else:
        print(str(x) + " " + str(y))
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    i = input()
    if i == "0 0":
        break
    else:
        i_list = i.split()
        int(i_list[0])
        int(i_list[1])
        i_list.sort()
        print(i_list[0],i_list[1])

Failing test case input:
4 -1
0 2
18 3
0 0

Expected output:
-1 4
0 2
3 18


Actual output:
-1 4
0 2
18 3


Fixed submission (verdict: Accepted):
while True:
    i = input()
    if i == "0 0":
        break
    else:
        i_list = i.split()
        int_list = []
        int_list.append(int(i_list[0]))
        int_list.append(int(i_list[1]))
        int_list.sort()
        print(int_list[0],int_list[1])

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
import sys

def main():
    for line in iter(sys.stdin.readline, ""):
        a = line.split(" ")
        if (a[0] == 0 and a[1] == 0):
            break;

        print(min(a) + " " + max(a))
     
if __name__ == "__main__":
    main()

Failing test case input:
3 4
2 6
5 6
0 0

Expected output:
3 4
2 6
5 6


Actual output:
3 4

2 6

5 6

0 0



Fixed submission (verdict: Accepted):
import sys

def main():
    for line in iter(sys.stdin.readline, ""):
        a = line.rstrip("\n").split(" ")
        b = []
        b.append(int(a[0]))
        b.append(int(a[1]))
        if (b[0] == 0 and b[1] == 0):
            return

        print(str(min(b)) + " " + str(max(b)))
     
if __name__ == "__main__":
    main()

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
indata = input().split()
x = []
x.append(indata[0])
y = []
y.append(indata[1])

i = 1

while True:
    indata = input().split()
    x.append(indata[0])
    y.append(indata[1])
    if int(x[i]) == int(y[i]) == 0:
        break
    i += 1

for j in range(len(x)):
    if int(x[j]) != 0 and int(y[j]) != 0:
        print(y[j],x[j])

Failing test case input:
3 0
0 2
5 5
0 0

Expected output:
0 3
0 2
5 5


Actual output:
5 5


Fixed submission (verdict: Accepted):
x = []
y = []

i = 0

while True:
    indata = input().split()
    x.append(indata[0])
    y.append(indata[1])
    if int(x[i]) == 0 and int(y[i]) == 0:
        break
    i += 1

for j in range(len(x)):
    if int(x[j]) == 0 and int(y[j]) == 0:
        pass
    else:
        if int(x[j]) < int(y[j]):
            print("{0} {1}".format(x[j],y[j]))
        else:
            print("{0} {1}".format(y[j],x[j]))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
l = []
while True:
  s = [str(i) for i in input().split()]
  if s == ['0','0']:
    break
  else:
    l.append(s[0]+' '+s[1])
for i in l:
  print(i)

Failing test case input:
4 -1
0 2
18 3
0 0

Expected output:
-1 4
0 2
3 18


Actual output:
4 -1
0 2
18 3


Fixed submission (verdict: Accepted):
l = []
while True:
  s = [int(i) for i in input().split()]
  if s == [0,0]:
    break
  else:
    s.sort()
    l.append(str(s[0])+' '+str(s[1]))
for i in l:
  print(i)
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True :
    x, y = map(int, input().split())

    if x == 0 or y == 0 :
        break
    elif x > y :
        z = x
        x = y
        y = z
        print(str(x) + " " + str(y))
    else :
        print(str(x) + " " + str(y))

Failing test case input:
3 0
0 2
27 3
0 0

Expected output:
0 3
0 2
3 27


Actual output:

Fixed submission (verdict: Accepted):
while True :
    x, y = map(int, input().split())

    if (x == 0) & (y == 0) :
        break
    elif x > y :
        print(y, x)
    else :
        print(str(x) + " " + str(y))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a,b = map(int,input().split())
    if a==0 and b==0:
        break
    else:
        a,b = b,a
        print(a,b)

Failing test case input:
3 0
0 2
9 5
0 0

Expected output:
0 3
0 2
5 9


Actual output:
0 3
2 0
5 9


Fixed submission (verdict: Accepted):
while True:
    a,b = list(map(int,input().split()))
    if a==0 and b==0:
        break
    elif a<=b:
        print(a,b)
    else:
        a,b = b,a
        print(a,b)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)
    if num1 == 0 and num2 == 0:
        break    
    

Failing test case input:
4 2
0 0
3 3
0 0

Expected output:
2 4


Actual output:
2 4
0 0


Fixed submission (verdict: Accepted):
while True:
    a = [int(i) for i in input().split(" ")]
    num1 = a[0]
    num2 = a[1]
    if num1 == 0 and num2 == 0:
        break
    elif num1 <= num2:
        print(num1,num2)
    elif num1 > num2:
        print(num2,num1)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a, b = [int(i) for i in input().split()]
    if a == 0 and b == 0:
        break
    print(b,a)

Failing test case input:
0 2
2 3
5 6
0 0

Expected output:
0 2
2 3
5 6


Actual output:
2 0
3 2
6 5


Fixed submission (verdict: Accepted):
while True:
    a, b = sorted([int(i) for i in input().split()])
    if not(a or b):
        break
    print(a,b)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
import sys


def main():
    while True:
        x, y = [int(i) for i in sys.stdin.readline().split(' ')]
        if x == 0 & y == 0:
            break
        elif x > y:
            print('{0} {1}'.format(x, y))
        else:
            print('{0} {1}'.format(y, x))
    return


if __name__ == '__main__':
    main()



Failing test case input:
3 0
-1 4
0 1
0 0

Expected output:
0 3
-1 4
0 1


Actual output:
3 0
4 -1


Fixed submission (verdict: Accepted):
import sys


def main():
    while True:
        x, y = [int(i) for i in sys.stdin.readline().split(' ')]
        if x == 0 and y == 0:
            break
        elif x <= y:
            print(x, y)
        else:
            print(y, x)


if __name__ == '__main__':
    main()
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
   break
  print('{0} {1}'.format(x,y))

Failing test case input:
4 3
3 5
0 6
0 0

Expected output:
3 4
3 5
0 6


Actual output:
4 3
3 5
0 6


Fixed submission (verdict: Accepted):
for i in range(3000):
  x,y=map(int,input().split())
  if x == 0 and y == 0:
    break
  print('{0} {1}'.format(min(x,y),max(x,y)))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    x,y = map(int,input().split())
    if x > y:
        print(f"{y} {x}")
    elif x < y:
        print(f"{x} {y}")
    elif x == 0 and y == 0:
        break


Failing test case input:
3 3
2 3
5 6
0 0

Expected output:
3 3
2 3
5 6


Actual output:
2 3
5 6


Fixed submission (verdict: Accepted):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        print(f"{y} {x}")
    elif x <= y:
        print(f"{x} {y}")

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):


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

while x!=0 and y!=0:
    if x>y:
        x,y=y,x
    print(str(x)+" "+str(y))

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

Failing test case input:
5 0
0 2
15 3
0 0

Expected output:
0 5
0 2
3 15


Actual output:

Fixed submission (verdict: Accepted):


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

while not(x==0 and y==0):
    if x>y:
        x,y=y,x
    print(str(x)+" "+str(y))

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

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
import sys


def main():
    while True:
        x, y = [int(i) for i in sys.stdin.readline().split(' ')]
        if x == 0 & y == 0:
            break
        elif x >= y:
            print('{0} {1}'.format(y, x))
        else:
            print('{0} {1}'.format(x, y))
    return


if __name__ == '__main__':
    main()



Failing test case input:
3 0
0 2
15 3
0 0

Expected output:
0 3
0 2
3 15


Actual output:
0 3


Fixed submission (verdict: Accepted):
import sys


def main():
    while True:
        x, y = [int(i) for i in sys.stdin.readline().split(' ')]
        if x == 0 and y == 0:
            break
        elif x <= y:
            print(x, y)
        else:
            print(y, x)


if __name__ == '__main__':
    main()

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
a, b = map(int, input().split())
while a and b:
    if (a == 0) and (b == 0):
        break
    if a > b:
        a, b = b, a
    print('{} {}'.format(a, b))
    a, b = map(int, input().split())


Failing test case input:
1 0
0 2
0 0
0 0

Expected output:
0 1
0 2


Actual output:

Fixed submission (verdict: Accepted):
x, y = input().split()
while x and y:
    x = int(x)
    y = int(y)
    if (x == 0) and (y == 0):
        break
    if x > y:
        x, y = y, x
    print('{} {}'.format(x, y))
    x, y = input().split()
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a,b = map(int,input().split())
    if a==0 and b==0:
        break
    print(b,a)

Failing test case input:
4 2
1 0
0 6
0 0

Expected output:
2 4
0 1
0 6


Actual output:
2 4
0 1
6 0


Fixed submission (verdict: Accepted):
while True:
    a = list(map(int,input().split()))
    a.sort()
    if a[1]==0:
        break
    print(a[0],a[1])

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while 1:
  x,y = map(int,input().split())
  if not x*y: break
  print(*sorted([x,y]))


Failing test case input:
3 2
-1 2
0 1
0 0

Expected output:
2 3
-1 2
0 1


Actual output:
2 3
-1 2


Fixed submission (verdict: Accepted):
while 1:
  x,y = sorted(map(int,input().split()))
  if not (x or y): break
  print(x,y)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a,b=map(int,input().split())
    if a==0 and b==0:
        quit()
    print(b,a)

Failing test case input:
1 1
2 3
9 3
0 0

Expected output:
1 1
2 3
3 9


Actual output:
1 1
3 2
3 9


Fixed submission (verdict: Accepted):
while True:
    a=sorted(map(int,input().split()))
    if a==[0,0]:
        quit()
    print(*a)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    x, y = map(int, input().split())
    if x == y == 0:
        break
    print(y, x, '\n')

Failing test case input:
4 3
2 5
5 6
0 0

Expected output:
3 4
2 5
5 6


Actual output:
3 4 

5 2 

6 5 



Fixed submission (verdict: Accepted):
while True:
    x = list(map(int, input().split()))
    if x[0] == x[1] == 0:
        break
    print(min(x), max(x))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
cnt = 1
output = []
while True:
	data = input().split()
	if data[0] == '0' and data[1] == '0':
		break
	output += [data[1] + " " + data[0]]

for line in output:
	print(line)


Failing test case input:
4 -1
0 2
27 3
0 0

Expected output:
-1 4
0 2
3 27


Actual output:
-1 4
2 0
3 27


Fixed submission (verdict: Accepted):
cnt = 1
output = []
while True:
	data = input().split()
	if data[0] == '0' and data[1] == '0':
		break
	elif int(data[0]) > int(data[1]):
		output += [data[1] + " " + data[0]]
	else:
		output += [data[0] + " " + data[1]]
for line in output:
	print(line)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a > b:
        print(b, a)
    elif a < b:
        print(a, b)

Failing test case input:
3 3
2 5
5 6
0 0

Expected output:
3 3
2 5
5 6


Actual output:
2 5
5 6


Fixed submission (verdict: Accepted):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    elif a > b or a == b:
        print(b, a)
    elif a < b:
        print(a, b)
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
for x, y in (i.split() for i in iter(input, "0 0")):
  print (y, x) if x > y else print (x, y)

Failing test case input:
3 -1
0 2
27 3
0 0

Expected output:
-1 3
0 2
3 27


Actual output:
-1 3
0 2
27 3


Fixed submission (verdict: Accepted):
for x, y in ((int(i) for i in j.split()) for j in iter(input, "0 0")):
  print(y, x) if x > y else print(x, y)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):

while True:
    x,y = input().split()
    x = int(x)
    y = int(y)
    if x==0 and y==0:
        break
    elif x<y:
        print(y,x)
    elif x>=y:
        print(x,y)

    


Failing test case input:
2 0
0 3
0 0
2 0

Expected output:
0 2
0 3


Actual output:
2 0
3 0


Fixed submission (verdict: Accepted):

while True:
    x,y = input().split()
    x = int(x)
    y = int(y)
    if x==0 and y==0:
        break
    elif x<y:
        print(x,y)
    elif x>=y:
        print(y,x)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
a=[]
b=[]
while True:
    n,m= map(int,input().split())
    if n == 0 and m==0:
        break
    a.append(n)
    b.append(m)
for i in range (len(a)):
    print(b[i],a[i])



Failing test case input:
2 1
1 0
2 3
0 0

Expected output:
1 2
0 1
2 3


Actual output:
1 2
0 1
3 2


Fixed submission (verdict: Accepted):
a=[]
b=[]
while True:
    n,m= map(int,input().split())
    if n == 0 and m== 0:
        break
    a.append(n)
    b.append(m)
for i in range (len(a)):
    if b[i] < a[i]:
        print(b[i],a[i])
    else:
        print(a[i],b[i])

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
x = []
y = []

i = 0

while True:
    indata = input().split()
    x.append(indata[0])
    y.append(indata[1])
    if int(x[i]) == int(y[i]) == 0:
        break
    i += 1

for j in range(len(x)):
    if int(x[j]) != 0 and int(y[j]) != 0:
        if int(x[j]) < int(x[j]):
            print(x[j],y[j])
        else:
            print(y[j],x[j])

Failing test case input:
3 0
0 2
15 3
0 0

Expected output:
0 3
0 2
3 15


Actual output:
3 15


Fixed submission (verdict: Accepted):
x = []
y = []

i = 0

while True:
    indata = input().split()
    x.append(indata[0])
    y.append(indata[1])
    if int(x[i]) == 0 and int(y[i]) == 0:
        break
    i += 1

for j in range(len(x)):
    if int(x[j]) == 0 and int(y[j]) == 0:
        pass
    else:
        if int(x[j]) < int(y[j]):
            print("{0} {1}".format(x[j],y[j]))
        else:
            print("{0} {1}".format(y[j],x[j]))
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
newArray = []

x, y = input().split()

while x + y != "00":
    if x < y or x == y:
        newArray.append([x, y])
    else:
        newArray.append([y, x])
    x, y = input().split()

for i in range(len(newArray)):
    print(newArray[i][0] + " " + newArray[i][1])

Failing test case input:
4 -1
0 2
18 3
0 0

Expected output:
-1 4
0 2
3 18


Actual output:
-1 4
0 2
18 3


Fixed submission (verdict: Accepted):
newArray = []

x, y = input().split()

while x + y != "00":
    x = int(x)
    y = int(y)
    if x < y or x == y:
        newArray.append([str(x), str(y)])
    else:
        newArray.append([str(y), str(x)])
    x, y = input().split()

for i in range(len(newArray)):
    print(newArray[i][0] + " " + newArray[i][1])

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
x,y = map(int, input().split())
while (x,y) == (0,0):
 if x < y:
  print(x,y)
 else:
  print(y,x)



Failing test case input:
3 0
0 2
9 3
0 0

Expected output:
0 3
0 2
3 9


Actual output:

Fixed submission (verdict: Accepted):
while True:
 x,y = map(int, input().split())
 if x==0 and y==0:
  break
 if x <= y:
  print(x,y)
 else:
  print(y,x)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
for i in range(len(n)):
    print('%d %d'%(n[i][0] if n[i][0]>=n[i][1] else n[i][1],n[i][0] if n[i][0]<=n[i][1] else n[i][1]))

Failing test case input:
1 0
0 2
0 0
0 0

Expected output:
0 1
0 2


Actual output:
1 0
2 0
0 0


Fixed submission (verdict: Accepted):
n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
for i in range(len(n)-1):
    print('%d %d'%(n[i][0] if n[i][0]<=n[i][1] else n[i][1],n[i][0] if n[i][0]>=n[i][1] else n[i][1]))
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):


def string_two_numbers_spliter():
    x, y = [int(i) for i in input('Enter two numbers concatenated ' +
    'by a single space between them, e.g. \'1 2\': ').split()]
    return x, y


def swap_two_numbers_asc(x, y):
    x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = swap_two_numbers_asc(x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

Failing test case input:
4 -1
0 2
18 3
0 0

Expected output:
-1 4
0 2
3 18


Actual output:
Enter two numbers concatenated by a single space between them, e.g. '1 2': -1 4
Enter two numbers concatenated by a single space between them, e.g. '1 2': 0 2
Enter two numbers concatenated by a single space between them, e.g. '1 2': 3 18
Enter two numbers concatenated by a single space between them, e.g. '1 2': 

Fixed submission (verdict: Accepted):


def string_two_numbers_spliter():
    x, y = [int(i) for i in input().split()]
    return x, y


def swap_two_numbers_asc(x, y):
    x, y = y, x
    return x, y


def main():
    while True:
        x, y = string_two_numbers_spliter()
        if x == 0 and y == 0:
            break
        if x > y:
            x, y = swap_two_numbers_asc(x, y)
        print('%d %d' % (x, y))


if __name__ == '__main__':
    main()

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    x,y = map(int,input().split())
    if x > y:
        print(f'{y}{x}')
    elif x < y:
        print(f'{x}{y}')
    elif x == 0 and y == 0:
        break


Failing test case input:
3 2
0 5
5 6
0 0

Expected output:
2 3
0 5
5 6


Actual output:
23
05
56


Fixed submission (verdict: Accepted):
while True:
    x,y = map(int,input().split())
    if x == 0 and y == 0:
        break
    if x > y:
        print(f"{y} {x}")
    elif x <= y:
        print(f"{x} {y}")

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    if a > b:
        print(a, b)
    elif a < b:
        print(b, a)

Failing test case input:
3 0
-1 2
0 1
0 0

Expected output:
0 3
-1 2
0 1


Actual output:
3 0
2 -1
1 0


Fixed submission (verdict: Accepted):
import sys

while True:
    x, y = map(int, sys.stdin.readline().split())
    if (x == 0 )and (y == 0):
        break

    if x < y:
        print(x, y)
    else:
        print(y, x)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
x = input().split()

while True :
    if x[0] == x[1] == '0' :
        break
    x.sort()
    print(x[0], x[1],end='\n')
    x = input().split()

Failing test case input:
4 0
0 2
15 3
0 0

Expected output:
0 4
0 2
3 15


Actual output:
0 4
0 2
15 3


Fixed submission (verdict: Accepted):
while True :
    x, y = input().split()

    if x == y == '0' :
        break
    x = int(x)
    y = int(y)
    if x < y : print(x, y)
    else     : print(y, x)
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
	a,b=map(int,input().split())
	if(a==0 and b==0):
		break
	print(b,a)



Failing test case input:
4 0
0 2
15 3
0 0

Expected output:
0 4
0 2
3 15


Actual output:
0 4
2 0
3 15


Fixed submission (verdict: Accepted):
while True:
	a,b=map(int,input().split())
	if(a==0 and b==0):
		break
	print(min(a,b),max(a,b))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
def ex(x, y):
    if x < y:
        tmp = x
        x = y
        y = tmp
    return x,y

def ex2num():
    tmp = input().split(" ")
    while ('0' != tmp[0]) or ('0' != tmp[1]):
        r1, r2 = ex(tmp[0], tmp[1])
        print (r1, r2)
        tmp = input().split(" ")

    return 0

if __name__ == "__main__":
    ret = ex2num()


Failing test case input:
3 0
0 2
9 3
0 0

Expected output:
0 3
0 2
3 9


Actual output:
3 0
2 0
9 3


Fixed submission (verdict: Accepted):
def ex(x, y):
    if x > y:
        tmp = x
        x = y
        y = tmp

    return x, y

def ex2num():
    r1, r2 = input().split(" ")
    r1 = int(r1)
    r2 = int(r2)
    while (0 != r1) or (0 != r2):
        r1, r2 = ex(r1, r2)
        print(r1, r2)
        r1, r2 = input().split(" ")
        r1 = int(r1)
        r2 = int(r2)

    return 0

if __name__ == "__main__":
    ret = ex2num()

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    case = input().split()
    if case[1] == "0" and case[0] == "0":
        break
    if case[1] < case[0]:
        print(case[1] +" "+ case[0])
    else:
        print(case[0] +" "+ case[1])




Failing test case input:
4 -1
0 2
18 5
0 0

Expected output:
-1 4
0 2
5 18


Actual output:
-1 4
0 2
18 5


Fixed submission (verdict: Accepted):
while True:
    case = input().split()
    if case[1] == "0" and case[0] == "0":
        break
    if int(case[1]) < int(case[0]):
        print(case[1] +" "+ case[0])
    else:
        print(case[0] +" "+ case[1])

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):

n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
for i in range(len(n)-1):
    print('%d %d'%(n[i][0] if n[i][0]>=n[i][1] else n[i][1],n[i][0] if n[i][0]<=n[i][1] else n[i][1]))

Failing test case input:
0 1
2 2
9 3
0 0

Expected output:
0 1
2 2
3 9


Actual output:
1 0
2 2
9 3


Fixed submission (verdict: Accepted):
n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
for i in range(len(n)-1):
    print('%d %d'%(n[i][0] if n[i][0]<=n[i][1] else n[i][1],n[i][0] if n[i][0]>=n[i][1] else n[i][1]))
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):


zeroCount = 0
while zeroCount == 0:
    numbers = [int(i) for i in input().rstrip().split()]
    
    if numbers[0] == 0 and numbers[1] == 0:
        zeroCount += 1
    else:
        swap = sorted(numbers)
        
        a = [str(n) for n in swap]
        print(a)



Failing test case input:
3 3
2 5
5 6
0 0

Expected output:
3 3
2 5
5 6


Actual output:
['3', '3']
['2', '5']
['5', '6']


Fixed submission (verdict: Accepted):


zeroCount = 0
while zeroCount == 0:
    numbers = [int(i) for i in input().rstrip().split()]
    
    if numbers[0] == 0 and numbers[1] == 0:
        zeroCount += 1
    else:
        swap = sorted(numbers)
        
        a = [str(n) for n in swap]
        print(" ".join(a))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while 1:
  x,y = sorted(map(int,input().split()))
  if not x*y: break
  print(x,y)


Failing test case input:
4 2
1 0
0 6
0 0

Expected output:
2 4
0 1
0 6


Actual output:
2 4


Fixed submission (verdict: Accepted):
while 1:
  x,y = sorted(map(int,input().split()))
  if not (x or y): break
  print(x,y)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
l = []
cnt = 0
while 1:
    x = input()
    if x == '0 0':
        break
    l.append(x)
    cnt += 1
for i in range(cnt):
    f = l[i].split()
    f.sort()
    print(f[0],f[1],sep=' ')
    f = []

Failing test case input:
4 -1
0 2
18 5
0 0

Expected output:
-1 4
0 2
5 18


Actual output:
-1 4
0 2
18 5


Fixed submission (verdict: Accepted):
l = []
cnt = 0
while 1:
    x = input()
    if x == '0 0':
        break
    l.append(x)
    cnt += 1
for i in range(cnt):
    f = list(map(int,l[i].split()))
    f.sort()
    print(f[0],f[1],sep=' ')
    del f[:]

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a, b = sorted([int(i) for i in input().split()])
    if not(a or b):
        break
    print(b,a)

Failing test case input:
3 0
0 2
5 2
0 0

Expected output:
0 3
0 2
2 5


Actual output:
3 0
2 0
5 2


Fixed submission (verdict: Accepted):
while True:
    a, b = sorted([int(i) for i in input().split()])
    if not(a or b):
        break
    print(a,b)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
  a, b = sorted(map(int, input().split()))
  if a == 0 & b == 0: break
  print(a, b)


Failing test case input:
4 0
0 2
15 3
0 0

Expected output:
0 4
0 2
3 15


Actual output:

Fixed submission (verdict: Accepted):
while True:
  a, b = sorted(map(int, input().split()))
  if a == 0 and b == 0: break
  print(a, b)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):


while True:
  [a, b] = [int(x) for x in input().strip().split(' ')]
  if a == 0 and b == 0:
    break
  print(b, a)

Failing test case input:
1 0
0 2
0 0
0 0

Expected output:
0 1
0 2


Actual output:
0 1
2 0


Fixed submission (verdict: Accepted):

 
while True:
  [a, b] = [int(x) for x in input().strip().split(' ')]
  if a == 0 and b == 0:
    break
  if a > b:
    b, a = a, b
  print(a, b)
Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
  x,y = (int(x) for x in input().split())

  if x == 0 and y == 0:
    break
  if x > y:
    print (str(x) + " " + str(y))
  else:
    print (str(y) + " " + str(x))


Failing test case input:
3 5
2 5
5 6
0 0

Expected output:
3 5
2 5
5 6


Actual output:
5 3
5 2
6 5


Fixed submission (verdict: Accepted):
while True:
  x,y = (int(x) for x in input().split())

  if x == 0 and y == 0:
    break
  if x < y:
    print (str(x) + " " + str(y))
  else:
    print (str(y) + " " + str(x))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
A=1
B=1
x=[]
while True:
    if A==0 and B==0:
        break
    else:
        A, B= map(int, input().split())
        if A > B:
            print(B,A)
        else:
            print(A,B)
           

Failing test case input:
4 3
3 5
0 6
0 0

Expected output:
3 4
3 5
0 6


Actual output:
3 4
3 5
0 6
0 0


Fixed submission (verdict: Accepted):

x=[]
while True:
    A, B= map(int, input().split())   
    if A==0 and B==0:
        break
    else:
        if A > B:
            print(B,A)
        else:
            print(A,B)

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(3000):
    x,y=[int(s) for s in input().split()]
    if x>y:
        print("{0} {1}".format(y,x))
    elif x<y:
        print("{0} {1}".format(x,y))
    elif x==0 and y==0:
        break

Failing test case input:
3 0
-1 2
5 5
0 0

Expected output:
0 3
-1 2
5 5


Actual output:
0 3
-1 2


Fixed submission (verdict: Accepted):
for i in range(3000):
    x,y=[int(s) for s in input().split()]
    if x==0 and y==0:
        break
    elif x<=y:
        print("{0} {1}".format(x,y))
    else :
        print("{0} {1}".format(y,x))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
indat = input().split()
x = []
x.append(indat[0])
y = []
y.append(indat[1])

i = 1

while True:
    indat = input().split()
    x.append(indat[0])
    y.append(indat[1])
    if int(x[i]) == int(y[i]) == 0:
        break
    i += 1

for j in range(len(x)):
    if int(x[j]) != 0 and int(y[j]) != 0:
        print("{0} {1}".format(y[j],x[j]))

Failing test case input:
4 -1
0 2
18 5
0 0

Expected output:
-1 4
0 2
5 18


Actual output:
-1 4
5 18


Fixed submission (verdict: Accepted):
x = []
y = []

i = 0

while True:
    indata = input().split()
    x.append(indata[0])
    y.append(indata[1])
    if int(x[i]) == 0 and int(y[i]) == 0:
        break
    i += 1

for j in range(len(x)):
    if int(x[j]) == 0 and int(y[j]) == 0:
        pass
    else:
        if int(x[j]) < int(y[j]):
            print("{0} {1}".format(x[j],y[j]))
        else:
            print("{0} {1}".format(y[j],x[j]))

Problem: p02397
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    a=input().split()
    if a==['0','0']:
        quit()
    print(*a[::-1])

Failing test case input:
3 1
-1 2
0 1
0 0

Expected output:
1 3
-1 2
0 1


Actual output:
1 3
2 -1
1 0


Fixed submission (verdict: Accepted):
while True:
    a=sorted(map(int,input().split()))
    if a==[0,0]:
        quit()
    print(*a)