Buggy python submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
xlist = input().split() # string
ylist = input().split() # string

def judge(z):
    for i in xlist:
        i = int(i)
        if not i < z:
            return 0
    for j in ylist:
        j = int(j)
        if j < z:
            return 0
        else:
            if str(j) == ylist[-1]:
                print('No War')
                sys.exit()

for z in range(X+1, Y+1):
    judge(z)
    if z == Y:
        print('War')

Fixed submission:
import sys
N, M, X, Y = map(int, input().split())
xlist = input().split() # string
ylist = input().split() # string

#intXlist = intYlist = []
intXlist = []
intYlist = []
for i in xlist:
    intXlist.append(int(i))
#intXlist.append(X)
for i in ylist:
    intYlist.append(int(i))
#intYlist.append(Y)

# print(max(intXlist))
# print(min(intYlist))

# mx = max(intXlist)
# my = min(intYlist)

# for z in range(X+1, Y+1):
#     return my <= mx:
#         print('No War')
#         sys.exit()
#     else:
#         continue
# print('War')


def judge(z):
    try:
        for i in xlist:
            i = int(i)
            if not i < z:
                return 0
            else:
                continue
        for j in ylist:
            j = int(j)
            if j < z:
                return 0
            else:
                if str(j) == ylist[-1]:
                    #print(z)
                    print('No War')
                    sys.exit()
    except Exception as e:
        print(e)
for z in range(X+1, Y+1):
    judge(z)
    if z == Y:
        print('War')

Buggy python submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
xlist = input().split() # string
ylist = input().split() # string

def judge(z):
    for i in xlist:
        i = int(i)
        if not i < z:
            return 0
    for j in ylist:
        j = int(j)
        if j < z:
            return 0
        else:
            if str(j) == ylist[-1]:
                print('No War')
                sys.exit()

for z in range(X+1, Y+1):
    judge(z)
    if z == Y-1:
        print('War')

Fixed submission:
import sys
N, M, X, Y = map(int, input().split())
xlist = input().split() # string
ylist = input().split() # string

#intXlist = intYlist = []
intXlist = []
intYlist = []
for i in xlist:
    intXlist.append(int(i))
#intXlist.append(X)
for i in ylist:
    intYlist.append(int(i))
#intYlist.append(Y)

# print(max(intXlist))
# print(min(intYlist))

# mx = max(intXlist)
# my = min(intYlist)

# for z in range(X+1, Y+1):
#     return my <= mx:
#         print('No War')
#         sys.exit()
#     else:
#         continue
# print('War')


def judge(z):
    try:
        for i in xlist:
            i = int(i)
            if not i < z:
                return 0
            else:
                continue
        for j in ylist:
            j = int(j)
            if j < z:
                return 0
            else:
                if str(j) == ylist[-1]:
                    #print(z)
                    print('No War')
                    sys.exit()
    except Exception as e:
        print(e)
for z in range(X+1, Y+1):
    judge(z)
    if z == Y:
        print('War')