Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x = int(input())
l_len = x // 100
l_sum = x % 100

if x < 100:
    print(0)
    exit()


def issum(lis, l_sum, l_len, curr_sum, curr_len):
    if l_sum - curr_sum > (l_len - curr_len) * 5:
        return
    if curr_sum > l_sum or curr_len > l_len:
        return
    if curr_sum == l_sum and curr_len == l_len:
        return True
    for i in range(6):
        if issum(lis, l_sum, l_len, curr_sum + lis[i], curr_len + 1):
            return True
a = [0, 1, 2, 3, 4, 5]
if issum(a, l_sum, l_len, 0, 0):
    print(1)
else:
    print(0)

Fixed submission:
x = int(input())
if x < 100:
    print(0)
    exit()

l_num = x // 100
l_sum = x % 100

if l_sum <= l_num * 5:
    print(1)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
x = int(input())
l_len = x // 100
l_sum = x % 100

if x < 100:
    print(0)
    exit(0)


def issum(lis, l_sum, l_len, curr_sum, curr_len):
    if l_sum - curr_sum > (l_len - curr_len) * 5:
        return
    if curr_sum > l_sum or curr_len > l_len:
        return
    if curr_sum == l_sum and curr_len == l_len:
        return True
    for i in range(6):
#         print(i, l_len)
        if issum(lis, l_sum, l_len, curr_sum + lis[i], curr_len + 1):
            return True
a = [0, 1, 2, 3, 4, 5]
if issum(a, l_sum, l_len, 0, 0):
    print(1)
else:
    print(0)

Fixed submission:
x = int(input())
if x < 100:
    print(0)
    exit()

l_num = x // 100
l_sum = x % 100

if l_sum <= l_num * 5:
    print(1)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
x = int(input())
l_len = x // 100
l_sum = x % 100

if x < 100:
    print(0)
    exit(0)


def issum(lis, l_sum, l_len, curr_sum, curr_len):

    if curr_sum > l_sum or curr_len > l_len:
        return
    if curr_sum == l_sum and curr_len == l_len:
        return True
    for i in range(6):
#         print(i, l_len)
        if issum(lis, l_sum, l_len, curr_sum + lis[i], curr_len + 1):
            return True
a = [0, 1, 2, 3, 4, 5]
if issum(a, l_sum, l_len, 0, 0):
    print(1)
else:
    print(0)

Fixed submission:
x = int(input())
if x < 100:
    print(0)
    exit()

l_num = x // 100
l_sum = x % 100

if l_sum <= l_num * 5:
    print(1)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
x = int(input())
l_len = x // 100
l_sum = x % 100
def issum(lis, l_sum, l_len, curr_sum, curr_len):
#     print(curr_sum)
    if curr_sum > l_sum or curr_len > l_len:
        return
    if curr_sum == l_sum and curr_len == l_len:
        return True
    for i in range(l_len):
        if issum(lis, l_sum, l_len, curr_sum + lis[i], curr_len + 1):
            return True
a = [0, 1, 2, 3, 4, 5]
if issum(a, l_sum, l_len, 0, 0):
  print(1)
else:
  print(0)

Fixed submission:
x = int(input())
if x < 100:
    print(0)
    exit()

l_num = x // 100
l_sum = x % 100

if l_sum <= l_num * 5:
    print(1)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
cnt = 0
for i in range(1000):
    str_i = str(i).zfill(3)
    i_ptr = 0
    s_ptr = 0
    
    while True:
        if i_ptr >= len(str_i):
            cnt += 1
            break

        while s_ptr <= len(s) - 1 and s[s_ptr] != str_i[i_ptr]:
            s_ptr += 1
        if s_ptr >= len(s):
            break
        i_ptr += 1
        s_ptr += 1
print(cnt)

Fixed submission:
from string import digits

n = int(input())
s = input()

cnt = 0
for i in digits:
    x = s.find(i)
    if x == -1:
        continue
    for j in digits:
        y = s.find(j, x + 1)
        if y == -1:
            continue
        for k in digits:
            z = s.find(k, y + 1)
            if z == -1:
                continue
            cnt += 1

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
s_lis = []
for i in range(len(s)):
    if s[i] not in s_lis:
        s_lis.append(s[i])
s_lis_len = len(s_lis)
del_n = n - 3
ch_n = len(s) - del_n
import itertools
lis = []
cnt = 0
for i in itertools.combinations(s, ch_n):
    if cnt >= s_lis_len ** 3:
        break
    tmp_ch = ''.join(i)
    if tmp_ch not in lis:
        lis.append(tmp_ch)
        cnt += 1
print(len(lis))

Fixed submission:
from string import digits

n = int(input())
s = input()

cnt = 0
for i in digits:
    x = s.find(i)
    if x == -1:
        continue
    for j in digits:
        y = s.find(j, x + 1)
        if y == -1:
            continue
        for k in digits:
            z = s.find(k, y + 1)
            if z == -1:
                continue
            cnt += 1

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
del_n = n - 3
ch_n = len(s) - del_n
import itertools
lis = []
for i in itertools.combinations(s, ch_n):
    tmp_ch = ''.join(i)
    if tmp_ch not in lis:
        lis.append(tmp_ch)
print(len(lis))

Fixed submission:
from string import digits

n = int(input())
s = input()

cnt = 0
for i in digits:
    x = s.find(i)
    if x == -1:
        continue
    for j in digits:
        y = s.find(j, x + 1)
        if y == -1:
            continue
        for k in digits:
            z = s.find(k, y + 1)
            if z == -1:
                continue
            cnt += 1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(len(l) - 2):
    for j in range(i + 1, len(l) - 1):
        low = j + 1
        high = len(l)
        while low < high:
            mid = (low + high) // 2
            if l[mid] == l[i] + l[j]:
                low = mid
                break
            elif l[mid] < l[i] + l[j]:
                low = mid + 1
            else:
                high = mid
        ans += low - 1 - j
print(ans)

Fixed submission:
import bisect
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(len(l) - 2):
    for j in range(i + 1, len(l) - 1):
        ans += bisect.bisect_left(l, l[i] + l[j]) - j - 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(len(l) - 2):
    for j in range(i + 1, len(l) - 1):
        for k in range(j + 1, len(l)):
            if l[i] + l[j] > l[k]:
                ans += 1
            else:
                break
print(ans)

Fixed submission:
import bisect
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(len(l) - 2):
    for j in range(i + 1, len(l) - 1):
        ans += bisect.bisect_left(l, l[i] + l[j]) - j - 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math

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

if a > b:
    a, b = b, a

# a_sq = int(math.sqrt(a)) + 1

com_div = []
# for i in range(1, a_sq + 1):
for i in range(1, a):
    if a % i == 0 and b % i == 0:
        com_div.append(i)
if len(com_div) == 1:
    print(1)
    exit()
    
ans = [1]
for i in range(1, len(com_div)):
    flg = 0
    for j in range(1, i):
        if com_div[i] % com_div[j] == 0:
            flg = 1
            break
    if flg == 0:
        ans.append(com_div[i])
print(len(ans))

Fixed submission:
import math

a, b = map(int, input().split())
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)
ab_gcd = gcd(a, b)

gcd_sq = int(math.sqrt(ab_gcd) + 1)

ans = []
curr_num = ab_gcd
for i in range(2, gcd_sq):
    if curr_num % i != 0:
        continue
    cnt = 0
    while curr_num % i == 0:
        curr_num = curr_num // i
        cnt += 1
    ans.append([i, cnt])
if curr_num != 1:
    ans.append([curr_num, 1])
print(len(ans) + 1)
Buggy python submission (verdict: Time Limit Exceeded):
import bisect
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
for i in range(m):
    nex_num = a[-1] // 2
    del a[-1]
    a.insert(bisect.bisect_left(a, nex_num), nex_num)
print(sum(a))

Fixed submission:
n, m = map(int, input().split())
a = list(map(int, input().split()))
a_minus = [-x for x in a]
import heapq
heapq.heapify(a_minus)
for i in range(m):
    nex_num = heapq.heappop(a_minus)
    nex_num = (-1 * nex_num) // 2 * -1
    heapq.heappush(a_minus, nex_num)
print(-sum(a_minus))

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = list(map(int, input().split()))
for i in range(m):
    tmp_max = max(a)
    del a[a.index(tmp_max)]
    a.append(tmp_max // 2)
print(sum(a))    

Fixed submission:
n, m = map(int, input().split())
a = list(map(int, input().split()))
a_minus = [-x for x in a]
import heapq
heapq.heapify(a_minus)
for i in range(m):
    nex_num = heapq.heappop(a_minus)
    nex_num = (-1 * nex_num) // 2 * -1
    heapq.heappush(a_minus, nex_num)
print(-sum(a_minus))

Buggy python submission (verdict: Time Limit Exceeded):
import heapq
n, m = map(int, input().split())
a = list(map(int, input().split()))
for i in range(m):
    tmp_max = heapq.nlargest(1, a)[0]
    del a[a.index(tmp_max)]
    a.append(tmp_max // 2)
print(sum(a))    

Fixed submission:
n, m = map(int, input().split())
a = list(map(int, input().split()))
a_minus = [-x for x in a]
import heapq
heapq.heapify(a_minus)
for i in range(m):
    nex_num = heapq.heappop(a_minus)
    nex_num = (-1 * nex_num) // 2 * -1
    heapq.heappush(a_minus, nex_num)
print(-sum(a_minus))
Buggy python submission (verdict: Runtime Error):
n = int(input())
b = list(map(int, input().split()))
if n == 2:
    print(b[0] * 2)
    exit()

a = []
b.append(b[-1])
for i in range(n):
    a.append(min(b[i - 1], b[i]))
print(sum(a))    

Fixed submission:
n, k = map(int, input().split())
s = input()

before = 0
score = 0
for i in range(n):
    if before == s[i]:
        score += 1
    before = s[i]

print(min(n - 1, score + k * 2))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = input().split()
h_lis = []
for i in range(n):
    h_lis.append(int(h[i]))
cnt_max = 0
for i in range(n):
    tmp_cnt = -1
    last = float('inf')
    for j in range(i, n):
#         print(h_lis[i], h_lis[j])
        if h_lis[j] <= last:
            tmp_cnt += 1
            last = h_lis[j]
        else:
            cnt_max = max(cnt_max, tmp_cnt)
            break
        cnt_max = max(cnt_max, tmp_cnt)
print(cnt_max)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
last = 0
cnt_lis = []
for i in range(n):
    if h[i] <= last:
        cnt_lis.append(cnt_lis[i - 1] + 1)
    else:
        cnt_lis.append(0)
    last = h[i]
print(max(cnt_lis))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = input().split()
h_lis = []
for i in range(n):
    h_lis.append(int(h[i]))


cnt_lis = []
for i in range(n):
    tmp_cnt = -1
    last = float('inf')
    for j in range(i, n):
#         print(h_lis[i], h_lis[j])
        if h_lis[j] <= last:
            tmp_cnt += 1
            last = h_lis[j]
        else:
            cnt_lis.append(tmp_cnt)
            break
        cnt_lis.append(tmp_cnt)
print(max(cnt_lis))

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
last = 0
cnt_lis = []
for i in range(n):
    if h[i] <= last:
        cnt_lis.append(cnt_lis[i - 1] + 1)
    else:
        cnt_lis.append(0)
    last = h[i]
print(max(cnt_lis))
Buggy python submission (verdict: Runtime Error):
n, q = map(int, input().split())
l = [[] for i in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    l[a - 1].append(b - 1)
    l[b - 1].append(a - 1)
r = [0] * n
for i in range(q):
    p, x = map(int, input().split())
    r[p - 1] += x
def dfs(v, p = -1):
    for to in l[v]:
        if to == p:
            continue
        r[to] += r[v]
        dfs(to, v)
dfs(0)
for t_r in r:
    print(t_r)

Fixed submission:
n, q = map(int, input().split())
l = [[] for i in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    l[a - 1].append(b - 1)
    l[b - 1].append(a - 1)
r = [0] * n
for i in range(q):
    p, x = map(int, input().split())
    r[p - 1] += x
stack = [0]
used = [False] * n    
while stack:
    i = stack.pop()
    used[i] = True
    for to in l[i]:
        if not used[to]:
            stack.append(to)
            r[to] += r[i]
for t_r in r:
    print(t_r)
Buggy python submission (verdict: Runtime Error):
import copy
n, m = map(int, input().split())
ab_lis = []
for i in range(n):
    ab_lis.append(list(map(int, input().split())))
def rec(ab_lis, path, rew, r_day, m_ans):
    if r_day == 0:
        m_ans[0] = max(m_ans[0], rew)
        return
    for t_lis in ab_lis:
        if t_lis in path:
            continue
        elif t_lis[0] > r_day:
            m_ans[0] = max(m_ans[0], rew)
            continue
        path_c = copy.copy(path)
        path_c.append(t_lis)
        rec(ab_lis, path_c, rew + t_lis[1], r_day - 1, ans)    
m_ans = [0]
rec(ab_lis, [], 0, m, m_ans)        
print(m_ans[0])

Fixed submission:
import collections
import heapq
n, m = map(int, input().split())
c = collections.defaultdict(list)
for i in range(n):
    a, b = map(int, input().split())
    if a > m:
        continue
    c[m - a].append(b)
h = []
heapq.heapify(h)    
ans = 0
for i in range(m - 1, -1, -1):
    for b in c[i]:
        heapq.heappush(h, -b)
    if len(h) >0:
        ans += -1 * heapq.heappop(h)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
n, m = map(int, input().split())
ab_lis = []
for i in range(n):
    ab_lis.append(list(map(int, input().split())))
def rec(ab_lis, path, rew, r_day, ans):
    if r_day == 0:
        ans.append(rew)
        return
    for t_lis in ab_lis:
        if t_lis in path:
            continue
        elif t_lis[0] > r_day:
            ans.append(rew)
            continue
        path_c = copy.copy(path)
        path_c.append(t_lis)
        rec(ab_lis, path_c, rew + t_lis[1], r_day - 1, ans)   
ans = []
rec(ab_lis, [], 0, m, ans)        
print(max(ans))

Fixed submission:
import collections
import heapq
n, m = map(int, input().split())
c = collections.defaultdict(list)
for i in range(n):
    a, b = map(int, input().split())
    if a > m:
        continue
    c[m - a].append(b)
h = []
heapq.heapify(h)    
ans = 0
for i in range(m - 1, -1, -1):
    for b in c[i]:
        heapq.heappush(h, -b)
    if len(h) >0:
        ans += -1 * heapq.heappop(h)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
b = []
a.insert(0, 0)
for i in range(n, 0, -1):
    t_sum = 0
    j = 2 * i
    while j <= n:
        t_sum ^= b[j]
        j += i
    b.append(t_sum ^ a[i])
print(sum(b))
for i in range(n):
    if b[i] != 0:
        print(1)    

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = [-1] * (n + 1)
a.insert(0, 0)

for i in range(n, 0, -1):
    t_sum = 0
    j = 2 * i
    while j <= n:
        t_sum ^= b[j]
        j += i
    b[i] = t_sum ^ a[i]
print(sum(b[1:]))
for i in range(1, n + 1):
    if b[i] != 0:
        print(i, end = ' ')
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n == 0:
    print(0)
    exit()
ans = ""
while n != 0:
    if n % (2) == 0:
        n = n // (-2)
        ans = ans + 0
    else:
        n = (n - 1) // (-2)
        ans = ans + 1
print(ans)

Fixed submission:
n = int(input())
if n == 0:
    print(0)
    exit()
ans = ""
while n != 0:
    if n % (2) == 0:
        n = n // (-2)
        ans = "0" + ans
    else:
        n = (n - 1) // (-2)
        ans = "1" + ans
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a_lis = list(map(int, input().split()))
a_sums = [0]
tmp_sum = 0
for i in range(n):
    tmp_sum += a_lis[i]
    a_sums.append(tmp_sum)
cnt = 0
for i in range(n + 1):
    for j in range(i + 1, n + 1):
        if (a_sums[j] - a_sums[i]) % m == 0:
            cnt += 1
print(cnt)

Fixed submission:
n, m = map(int, input().split())
a_lis = list(map(int, input().split()))
asum_mods = [0]
tmp_sum = 0
for i in range(n):
    tmp_sum += a_lis[i]
    asum_mods.append(tmp_sum % m)
import collections
c = collections.Counter(asum_mods).values()
ans = 0
for b in c:
    ans += b * (b - 1) // 2
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
a_c = a
for i in range(n):
    a_c[i] -= i
min_a_c = min(a_c)
max_a_c = max(a_c)
scores = []
for j in range(min_a_c, max_a_c + 1):
    tmp_score = 0
    for i in range(n):
        tmp_score += abs(a_c[i] - j)
    scores.append(tmp_score)
print(min(scores))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
a_c = a
for i in range(n):
    a_c[i] -= i
a_c.sort()
med = a_c[n // 2]
score = 0
for i in range(n):
    score += abs(a_c[i] - med)
print(score)
Buggy python submission (verdict: Runtime Error):
a, b = int(input())
if (a <= 8) & (b <= 8):
  print('Yay!')
else:
  print(':(')

Fixed submission:
a, b = map(int, input().split())
if (a <= 8) & (b <= 8):
  print('Yay!')
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
a = int(input())
for  _ in range(3):
  if a % 10 == 7:
    print("Yes")
   	break
  a /= 10
else:
  print("No")

Fixed submission:
a = input()
if '7' in a:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a = input()
for  _ in range(3):
  if a % 10 == 7:
    print("Yes")
    return
  a /= 10
print("No")
return

Fixed submission:
a = input()
if '7' in a:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
x = int(input())

#y以上の値は候補とならない
y = int(math.sqrt(x))

k_max = 1
if y >= 2:
    for i in range(2, y + 1):
        j = int(math.log10(x) / math.log10(i))
        k = i ** j
        
        
        if k > k_max:
            k_max = k
    
print(k_max)

Fixed submission:
import math

x = int(input())

#y以上の値は候補とならない
y = int(math.sqrt(x))

k_max = 1
if y >= 2:
    for i in range(2, y + 1):
        j = int(math.log10(x) / math.log10(i))
        k = i ** j
        
        
        if k > k_max:
            k_max = k
    
print(k_max)
Buggy python submission (verdict: Runtime Error):
def judge(z):
    if z >= 0:
        remain = n - z
        pay = [[i, remain - i] for i in range(remain + 1)]

        for i in range(remain + 1):
            if 10 * pay[i][0] + 5 * pay[i][1] + z == m:
                print(pay[i][0], pay[i][1], z)
                exit()

        judge(z - 1)

    else:
        print(-1, -1, -1)


n, M = list(map(int, input().split(" ")))
m = int(M / 1000)

judge(n)


Fixed submission:
def pay(i: int, remain: int, z: int):
    for i in range(0, (n - z) + 1):
        if 10 * i + 5 * (remain - i) + z == m:
            print(i, remain - i, z)
            exit()

    return


n, M = list(map(int, input().split(" ")))
m = int(M / 1000)

for z in range(n, -1, -1):
    pay(0, n - z, z)

print(-1, -1, -1)

Buggy python submission (verdict: Runtime Error):
def abc_list(c: int):
    a = -n + m / 5 + 4 * c / 5
    b = 2 * n + -m / 5 - 9 * c / 5

    if a >= 0 and b >= 0:
        return [int(a), int(b), c]

    else:
        return False


def judge(z):
    if z <= n:
        l = abc_list(z)

        if l == False or sum(l) != n:
            judge(z + 1)
        else:
            print(l[0], l[1], l[2])

    else:
        print(-1, -1, -1)


n, M = list(map(int, input().split(" ")))
m = int(M / 1000)

judge(0)


Fixed submission:
def pay(i: int, remain: int, z: int):
    for i in range(0, (n - z) + 1):
        if 10 * i + 5 * (remain - i) + z == m:
            print(i, remain - i, z)
            exit()

    return


n, M = list(map(int, input().split(" ")))
m = int(M / 1000)

for z in range(n, -1, -1):
    pay(0, n - z, z)

print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
s=raw_input().split()
if s[0]==s[1] and s[0]!=s[2]:
  print "Yes"
elif s[0]==s[2] and s[0]!=s[1]:
  print "Yes"
elif s[1]==s[2] and s[1]!=s[0]:
  print "Yes"
elif s[1]==s[0] and s[1]!= s[2]:
  print "Yes"
elif s[2]==s[0] and s[2]!= s[1]:
  print "Yes"
elif s[2]==s[1] and s[2]!= s[0]:
  print "Yes"
else:
  print "No"
  

Fixed submission:
s=raw_input()
if s[0]==s[1] and s[0]!=s[2]:
  print "Yes"
elif s[0]==s[2] and s[0]!=s[1]:
  print "Yes"
elif s[1]==s[2] and s[1]!=s[0]:
  print "Yes"
elif s[1]==s[0] and s[1]!= s[2]:
  print "Yes"
elif s[2]==s[0] and s[2]!= s[1]:
  print "Yes"
elif s[2]==s[1] and s[2]!= s[0]:
  print "Yes"
else:
  print "No"
Buggy python submission (verdict: Runtime Error):
n=input()
a=map(int,raw_input().split())
for i in a:
  if a[i]%2==0:
    if a[i]%3==0 or a[i]%5==0:
      print "APPROVED"
  else:
    print "DENIED"
  


Fixed submission:
n=input()
a=map(int,raw_input().split())
ans="APPROVED"
for i in range(n):
  if a[i]%2==0:
    if a[i]%3!=0 and a[i]%5!=0:
      ans="DENIED"
print ans
Buggy python submission (verdict: Runtime Error):
s=raw_input()
print len(s)*x

Fixed submission:
s=raw_input()
print len(s)*"x"
Buggy python submission (verdict: Runtime Error):
s=[chr(i) for i in range(97,122)]
c=raw_input()
ans= s.index(c)
print s[ans+1]

Fixed submission:
s=[chr(i) for i in range(97,123)]
c=raw_input()
ans= s.index(c)
print s[ans+1]

Buggy python submission (verdict: Runtime Error):
s=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y']
c=raw_input()
ans= s.index(c)
print s[ans+1]


Fixed submission:
s=[chr(i) for i in range(97,123)]
c=raw_input()
ans= s.index(c)
print s[ans+1]
Buggy python submission (verdict: Runtime Error):
a= ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]
s=raw_input()
idNum=a.index(s)
if idNum == 6:
  print 7
else:
  print 6- idNum


Fixed submission:
a= ["MON","TUE","WED","THU","FRI","SAT","SUN"]
s=raw_input()
idNum=a.index(s)
if idNum == 6:
  print 7
else:
  print 6- idNum
Buggy python submission (verdict: Runtime Error):
n=input()
if n%2==0:
  print0.5
else:
  print (n+1)*1.0/2/n

Fixed submission:
n=input()
if n%2 ==0:
  print 0.5
else:
  print (n+1)*1.0/2/n
Buggy python submission (verdict: Runtime Error):
s = raw_input()
arr=["sunny","cloudy","rainy"]
n=arr.index(s)
print arr[(n+1)%len(arr)]

Fixed submission:
s = raw_input()
arr=["Sunny","Cloudy","Rainy"]
n=arr.index(s)
print arr[(n+1)%len(arr)]
Buggy python submission (verdict: Runtime Error):
s= raw_input 
t= raw_input
ans=0
for i in range(3):
  if s[i]==t[i]:
    ans+=
print ans


Fixed submission:
s = raw_input()
t = raw_input()

ans=0
for i in range(3):
  if s[i] == t[i]:
    ans+=1
print ans
Buggy python submission (verdict: Runtime Error):
a

Fixed submission:
a,b=map(int,raw_input().split())
x=a+b
y=a-b
z=a*b
if x<y:
  x=y
if x<z:
  x=z
print x
Buggy python submission (verdict: Runtime Error):
a


Fixed submission:
a,b=map(int,raw_input().split())
if (a+b)%2==0:
  print (a+b)/2
else:
  print "IMPOSSIBLE"
Buggy python submission (verdict: Runtime Error):
a

Fixed submission:
r=input()
ans= r**2*3
print ans
Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,raw_input().split())
if a==b:
  print a+b
else:
  print max(a,b)*2-1

Fixed submission:
a,b=map(int,raw_input().split())
if a==b:
  print a+b
else:
  print max(a,b)*2-1
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a <=k:
  print Yay!
else:
  print :(

Fixed submission:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
if e-a<=k:
  print "Yay!"
else:
  print ":("
Buggy python submission (verdict: Runtime Error):
b=input()
if b=="A":
    print "T"
if b=="T":
    print "A"
if b=="C":
    print "G"
if b=="G":
    print "C"

Fixed submission:
b=raw_input()
if b=="A":
    print "T"
if b=="T":
    print "A"
if b=="C":
    print "G"
if b=="G":
    print "C"

Buggy python submission (verdict: Runtime Error):
b=input()
A,C,T,G=map(str,raw_input().split())
if b=="A":
    print "C"
if b=="C":
    print "A"
if b=="T":
    print "G"
if b=="G":
    print "T"
    

Fixed submission:
b=raw_input()
if b=="A":
    print "T"
if b=="T":
    print "A"
if b=="C":
    print "G"
if b=="G":
    print "C"
Buggy python submission (verdict: Runtime Error):
A,B,C=map(int,raw_input().split())
if B/A>C
print C
else:
  print B/A 

Fixed submission:
A,B,C=map(int,raw_input().split())
if B/A>C:
    print C
else:
    print B/A
Buggy python submission (verdict: Runtime Error):
s=raw_input()
month=int(S[5:7])
if month>=5:
  print "TBD"
else:
  print "HeiSei"
  

Fixed submission:
S=raw_input()
month=int(S[5:7])
if month>=5:
  print "TBD"
else:
  print "Heisei"