Buggy python submission (verdict: Runtime Error):
N = int(raw_input())
a = map(int, raw_input().split(" "))
b = [-1]
a = b + a
#print a
count = 0
for i in range(1,N+1):
    #print a.index(a[int(a[i])])
    if i == a[a[i]] and a.index(a[a[i]]) == a[i]:
        count +=1
        a[i] = 0
        a[(a[i])] = 0

print count

Fixed submission:
str = raw_input()

str1 = str[0:4]
str2 = str[4:len(str)]

print str1 +" " + str2

Buggy python submission (verdict: Runtime Error):
s=input()
list=[]
k=int(input())
for i in range(len(s)-1):
    if (ord(s[i])+k)>122:
        list.append('a')
        k=k-(123-ord(s[i]))
    else:
        list.append(s[i])
list.append(chr(ord(s[len(s)])+k))
for i in range(len(s)):
    print(list[i], end='')

Fixed submission:
s = input()
print (s[0:4], end=' ')
print(s[4:12])

Buggy python submission (verdict: Runtime Error):
s = list(raw_input())
k = int(raw_input())

for i in range(len(s)):
    numChanges = ord('z') - ord(s[i]) + 1
    if s[i] != 'a' and numChanges <= k:
        s[i] = 'a'
        k -= numChanges

    if i == len(s) - 1:
        s[i] = chr(ord(s[i]) + (k % 26))

print ''.join(s)



Fixed submission:
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
s = list(raw_input())
k = int(raw_input())

for i in range(len(s)):
    numChanges = ord('z') - ord(s[i]) + 1
    if s[i] != 'a' and numChanges <= k:
        s[i] = chr(ord(s[i]) - 26 + numChanges)
        k -= numChanges

    elif i == len(s) - 1 and numChanges > k:
        s[i] = chr(ord(s[i]) + k)

print ''.join(s)
        

Fixed submission:
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
s = raw_input
print s[:4] + ' ' + s[4:]

Fixed submission:
# -*- coding: utf-8 -*-
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
def cod(s):
    return s[:4] + ' ' + s[4:]
k = sys.argv[1]
cod(k)

Fixed submission:
# -*- coding: utf-8 -*-
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
s = sys.argv[1]
print s[:4] + ' ' + s[4:]

Fixed submission:
# -*- coding: utf-8 -*-
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
print s[:4] + ' ' + s[4:]

Fixed submission:
# -*- coding: utf-8 -*-
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
import sys
def codefestival(s):
    return s[4:] + ' ' + s[4:]
codefestival(sys.argv[1])

Fixed submission:
# -*- coding: utf-8 -*-
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
print s[:4] + ' ' + s[4:]

Fixed submission:
# -*- coding: utf-8 -*-
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
return s[:4] + " " + s[4:]

Fixed submission:
# -*- coding: utf-8 -*-
s = raw_input()
print s[:4] + ' ' + s[4:]

Buggy python submission (verdict: Runtime Error):
s = raw_input()
k = int(raw_input())

opreq = [(ord('z') - ord(c) + 1) % 26 for c in s]

s_ = []

if len(s) > 1:
    i = 0
    while k > 0 and i < len(s) - 1:
        if opreq[i] < k:
            k = k - opreq[i]
            s_.append('a')
        else:
            s_.append(s[i])
        i += 1

# Last character
last_c = chr((k + ord(s[-1]) - ord('a')) % 26 + ord('a'))
s_.append(last_c)

print("".join(s_))

Fixed submission:
s = raw_input()
print("{} {}".format(s[:4], s[4:]))

Buggy python submission (verdict: Runtime Error):
N = int(input())
like_rabbits_list = list(map(int, input().split()))

sum_of_pairs = 0
for i,rabbit in enumerate(like_rabbits_list):
    if like_rabbits_list[rabbit - 1] == (i+1):
        sum_of_pairs += 1

print (int(sum_of_pairs / 2))

Fixed submission:
code_festival = input()

code = code_festival[:4]
festival = code_festival[4:]

code_festival = code + " " + festival
print (code_festival)