Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())
a = []
b = []
ikeru = [0]*(N+1)
for i in range(M):
    a_tmp, b_tmp = map(int, raw_input().split())
    a.append(a_tmp)
    b.append(b_tmp)

for i in range(M):
    if a[i] == 1:
        ikeru[b[i]] = 1
ikeru_2 = [0]*(N+1)
for i in range(M):
    if ikeru[a[i]] == 1:
        ikeru_2[b[i]] = 1
if ikeru_2[N] == 1 or ikeru[N] == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Fixed submission:
N, M = map(int, input().split())
a = []
b = []
ikeru = [0]*(N+1)
for i in range(M):
    a_tmp, b_tmp = map(int, input().split())
    a.append(a_tmp)
    b.append(b_tmp)

for i in range(M):
    if a[i] == 1:
        ikeru[b[i]] = 1
ikeru_2 = [0]*(N+1)
for i in range(M):
    if ikeru[a[i]] == 1:
        ikeru_2[b[i]] = 1
if ikeru_2[N] == 1 or ikeru[N] == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())
a = []
b = []
ikeru = [0]*(N+1)
for i in range(M):
    a_tmp, b_tmp = map(int, raw_input().split())
    a.append(a_tmp)
    b.append(b_tmp)

for i in range(M):
    if a[i] == 1:
        ikeru[b[i]] = 1
ikeru_2 = [0]*(N+1)
for i in range(M):
    if ikeru[a[i]] == 1:
        ikeru_2[b[i]] = 1
if ikeru_2[N] == 1 || ikeru[N] == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


Fixed submission:
N, M = map(int, input().split())
a = []
b = []
ikeru = [0]*(N+1)
for i in range(M):
    a_tmp, b_tmp = map(int, input().split())
    a.append(a_tmp)
    b.append(b_tmp)

for i in range(M):
    if a[i] == 1:
        ikeru[b[i]] = 1
ikeru_2 = [0]*(N+1)
for i in range(M):
    if ikeru[a[i]] == 1:
        ikeru_2[b[i]] = 1
if ikeru_2[N] == 1 or ikeru[N] == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
import sys
N, M = map(int, raw_input().split())
a = []
b = []
ikeru = [0]*(N+1)
for i in range(M):
    a_tmp, b_tmp = map(int, raw_input().split())
    a.append(a_tmp)
    b.append(b_tmp)

for i in range(M):
    if a[i] == 1:
        ikeru[b[i]] = 1
ikeru_2 = [0]*(N+1)
for i in range(M):
    if ikeru[a[i]] == 1:
        ikeru_2[b[i]] = 1
if ikeru_2[N] == 1 || ikeru[N] == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


Fixed submission:
N, M = map(int, input().split())
a = []
b = []
ikeru = [0]*(N+1)
for i in range(M):
    a_tmp, b_tmp = map(int, input().split())
    a.append(a_tmp)
    b.append(b_tmp)

for i in range(M):
    if a[i] == 1:
        ikeru[b[i]] = 1
ikeru_2 = [0]*(N+1)
for i in range(M):
    if ikeru[a[i]] == 1:
        ikeru_2[b[i]] = 1
if ikeru_2[N] == 1 or ikeru[N] == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Buggy python submission (verdict: Runtime Error):
import sys
N, M = map(int, raw_input().split())
a = []
b = []
ikeru = [0]*(N+1)
for i in range(M):
    a_tmp, b_tmp = map(int, raw_input().split())
    a.append(a_tmp)
    b.append(b_tmp)

for i in range(M):
    if a[i] == 1:
        ikeru[b[i]] = 1
if ikeru[N] == 1:
    print("POSSIBLE")
    sys.exit()
ikeru_2 = [0]*(N+1)
for i in range(M):
    if ikeru[a[i]] == 1:
        ikeru_2[b[i]] = 1
if ikeru_2[N] == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


Fixed submission:
N, M = map(int, input().split())
a = []
b = []
ikeru = [0]*(N+1)
for i in range(M):
    a_tmp, b_tmp = map(int, input().split())
    a.append(a_tmp)
    b.append(b_tmp)

for i in range(M):
    if a[i] == 1:
        ikeru[b[i]] = 1
ikeru_2 = [0]*(N+1)
for i in range(M):
    if ikeru[a[i]] == 1:
        ikeru_2[b[i]] = 1
if ikeru_2[N] == 1 or ikeru[N] == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")