Buggy python submission (verdict: Runtime Error):
if __name__=="__main__":
    N, K = map(int, input().split(' '))
    _town_list = input().split(' ')
    town_list = [int(n) for n in _town_list]

    next_town = town_list[0]
    visited_town = [1]
    visited_town.append(next_town)
    counter = 1

    while True:
        counter += 1
        next_town = town_list[next_town-1]
        if counter == K:
            print(next_town)
            break
        if next_town in visited_town:
            repeated_town_idx = visited_town.index(next_town)
            loop_num = counter - repeated_town_idx
            print(visited_town[(K-repeated_town_idx)%loop_num + repeated_town_idx])
            break
        visited_town.append(next_town)

Fixed submission:
if __name__=="__main__":
    # Problem A
    S_name = input()
    T_name = input()
    flag = "Yes"

    if len(T_name) == len(S_name) + 1:
        pass
    else:
        flag = "No"

    for idx, s_char in enumerate(S_name):
        if T_name[idx] == s_char:
            pass
        else:
            flag = "No"
    print(flag)

Buggy python submission (verdict: Runtime Error):
if __name__=="__main__":
    num_plus_one, num_zero, num_minus_one, total_num = map(int, input().split(' '))

    if total_num <= num_plus_one:
        counter = total_num
    elif total_num <= num_plus_one + num_zero:
        counter = num_plus_one
    elif total_num <= num_plus_one + num_zero + num_minus_one:
        counter = num_plus_one - (total_num - num_plus_one - num_zero)
    else:
        counter = num_plus_one - num_minus_one

    print(counter)

Fixed submission:
if __name__=="__main__":
    # Problem A
    S_name = input()
    T_name = input()
    flag = "Yes"

    if len(T_name) == len(S_name) + 1:
        pass
    else:
        flag = "No"

    for idx, s_char in enumerate(S_name):
        if T_name[idx] == s_char:
            pass
        else:
            flag = "No"
    print(flag)

Buggy python submission (verdict: Runtime Error):
if __name__=="__main__":
    num_plus_one, num_zero, num_minus_one, total_num = map(int, input().split(' '))

    if total_num <= num_plus_one:
        counter = total_num
    elif total_num <= num_plus_one + num_zero:
        counter = num_plus_one
    elif total_num <= num_plus_one + num_zero + num_minus_one:
        counter = num_plus_one - (total_num - num_plus_one - num_zero)
    else:
        counter = num_plus_one - num_minus_one

    print(counter)

Fixed submission:
if __name__=="__main__":
    # Problem A
    S_name = input()
    T_name = input()
    flag = "Yes"

    if len(T_name) == len(S_name) + 1:
        pass
    else:
        flag = "No"

    for idx, s_char in enumerate(S_name):
        if T_name[idx] == s_char:
            pass
        else:
            flag = "No"
    print(flag)

Buggy python submission (verdict: Runtime Error):
if __name__=="__main__":
    num_plus_one, num_zero, num_minus_one, total_num = map(int, input().split(' '))

    if total_num <= num_plus_one:
        counter = total_num
    elif total_num <= num_plus_one + num_zero:
        counter = num_plus_one
    elif total_num <= num_plus_one + num_zero + num_minus_one:
        counter = num_plus_one - (total_num - num_plus_one - num_zero)
    else:
        counter = num_plus_one - num_minus_one

    print(counter)

Fixed submission:
if __name__=="__main__":
    # Problem A
    S_name = input()
    T_name = input()
    flag = "Yes"

    if len(T_name) == len(S_name) + 1:
        pass
    else:
        flag = "No"

    for idx, s_char in enumerate(S_name):
        if T_name[idx] == s_char:
            pass
        else:
            flag = "No"
    print(flag)