Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = list(map(int, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n += 1
  Li = list(n)
else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = list(map(int, input().split()))
Li = list(n)
while set(Li)&set(li):
  n += 1
  Li = list(n)
else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
for i in range(k):
  li.append(int(input()))
else:
  Li = list(n)
  while not len(set(li)&set(Li)) == 0:
    n += 1
    Li = list(n)
  else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
for i in range(k):
  li.append(int(input()))
else:
  Li = list(n)
  while not len(set(li)&set(Li)):
    n += 1
    Li = list(n)
  else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(n)
  while not len(set(li)&set(Li)):
    n += 1
    Li = list(n)
  else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(n)
  while not set(li)&set(Li) == set():
    n += 1
    Li = list(n)
  else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(n)
  while not set(li)&set(Li) == {}:
    n += 1
    Li = list(n)
  else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(n)
  while li&Li:
    n += 1
    Li = list(n)
  else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(str(n))
  while li&Li:
    n += 1
    Li = list(str(n))
  else: print("".join(Li))

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))