a, b = list(map(int, input().split()))

if a <= b:

    print(a)

else:

    print((a-1))
a, b = list(map(int, input().split()))

ans = -1

if (a <= b):

    ans = a

else:

    ans = a - 1

print(ans)
a, b = list(map(int, input().split()))
if a <= b:
    print(a)
else:
    print((a - 1))

a, b = list(map(int, input().split()))
ans = -1
if a <= b:
    ans = a
else:
    ans = a - 1
print(ans)

+ans = -1 -    print(a) +    ans = a -    print((a - 1)) +    ans = a - 1 +print(ans)