TnT/CodeNet4Repair huggingface dataset:
Problem:
We have a tree with N vertices numbered 1 to N. The i-th edge in the tree connects Vertex u_i and Vertex v_i, and its length is w_i. Your objective is to paint each vertex in the tree white or black (it is fine to paint all vertices the same color) so that the following condition is satisfied:    * For any two vertices painted in the same color, the distance between them is an even number.  Find a coloring of the vertices that satisfies the condition and print it. It can be proved that at least one such coloring exists under the constraints of this problem.

Incorrect submission (verdict: Wrong Answer):
import sys
input = sys.stdin.readline
N=int(input())
ki=[[] for f in range(N)]
for i in range(N-1):
 u,v,w = map(int,input().split())
 ki[u-1].append([v-1,w%2])
 ki[v-1].append([u-1,w%2])
stack = [[0,0]]
check = [0]*N 
ans=[2]*N
ans[0]=0
while stack != [] :
 a=stack.pop()
 if check[a[0]]==0:
  check[a[0]]=1
  for i in range(len(ki[a[0]])):
   stack.append([ki[a[0]][i][0],(ki[a[0]][i][1]+ans[i])%2])
   ans[ki[a[0]][i][0]]=(ki[a[0]][i][1]+ans[i])%2
for i in ans:
 print(i)


Fixed, accepted submission:
from collections import deque
import sys
input = sys.stdin.readline
N=int(input())
ki=[[] for f in range(N)]
for i in range(N-1):
 u,v,w = map(int,input().split())
 ki[u-1].append([v-1,w%2])
 ki[v-1].append([u-1,w%2])
stack = deque([[0,0]])
check = [0]*N 
ans=[2]*N
ans[0]=0
while stack != deque([]) :
 a=stack.pop()
 ne=a[0]
 if check[ne]==0:
  check[ne]=1
  for i in range(len(ki[ne])):
   eda=ki[ne][i][0]
   edanum=ki[ne][i][1]
   edaans=(edanum+ans[ne])%2
   if check[eda]==0:
    stack.append([eda,edaans])
    ans[eda]=edaans
for i in ans:
 print(i)
Problem:
There are N people numbered 1 to N. Each person wears a red hat or a blue hat.  You are given a string s representing the colors of the people. Person i wears a red hat if s_i is `R`, and a blue hat if s_i is `B`.  Determine if there are more people wearing a red hat than people wearing a blue hat.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
s = input()
if s.count('R')>N/2:
  print('YES')
else:
  print('NO')

Fixed, accepted submission:
N = int(input())
s = input()
if s.count('R')>N/2:
  print('Yes')
else:
  print('No')
Problem:
There are N children in AtCoder Kindergarten. Mr. Evi will arrange the children in a line, then give 1 candy to the first child in the line, 2 candies to the second child, ..., N candies to the N-th child. How many candies will be necessary in total?

Incorrect submission (verdict: Wrong Answer):
given = [x for x in input()]
rets  = ''
for i, v in  enumerate(given):
    if v == "B" and len(rets) > 0:
        rets = rets[:-1]
    else:
        rets += v
print(rets)



Fixed, accepted submission:
N = int(input())
a = (N * (N + 1)) // 2
print(a)
Problem:
Write a program which reads three integers a, b and c, and prints "Yes" if a < b < c, otherwise "No".

Incorrect submission (verdict: Wrong Answer):
a,b,c = map(int,input().split())

if a> b:
 if b>c:
  print("Yes")
 else:
  print("No")
else:
 print("No")



Fixed, accepted submission:
a,b,c = map(int,input().split())

if a < b and b < c:
  print("Yes")
else:
  print("No")
Problem:
Write a program which finds a pattern $p$ in a ring shaped text $s$.     

Incorrect submission (verdict: Wrong Answer):
# Belongs to : midandfeed aka asilentvoice
s = str(input())*2
q = str(input())
print(["NO", "YES"][q in s])

Fixed, accepted submission:
# Belongs to : midandfeed aka asilentvoice
s = str(input())*2
q = str(input())
print(["No", "Yes"][q in s])
Problem:
M-kun has the following three cards:    * A red card with the integer A.   * A green card with the integer B.   * A blue card with the integer C.  He is a genius magician who can do the following operation at most K times:    * Choose one of the three cards and multiply the written integer by 2.  His magic is successful if both of the following conditions are satisfied after the operations:    * The integer on the green card is **strictly** greater than the integer on the red card.   * The integer on the blue card is **strictly** greater than the integer on the green card.  Determine whether the magic can be successful.

Incorrect submission (verdict: Wrong Answer):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

a,b,c=MI()
k=II()

while b<=a:
    b*=2
    k-=1
    if k<0:
        print("NO")
        exit()

while c<=b:
    c*=2
    k-=1
    if k<0:
        print("NO")
        exit()

print("YES")


Fixed, accepted submission:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

a,b,c=MI()
k=II()

while b<=a:
    b*=2
    k-=1
    if k<0:
        print("No")
        exit()

while c<=b:
    c*=2
    k-=1
    if k<0:
        print("No")
        exit()

print("Yes")
Problem:
Takahashi has a strong stomach. He never gets a stomachache from eating something whose "best-by" date is at most X days earlier. He gets a stomachache if the "best-by" date of the food is X+1 or more days earlier, though.  Other than that, he finds the food delicious if he eats it not later than the "best-by" date. Otherwise, he does not find it delicious.  Takahashi bought some food A days before the "best-by" date, and ate it B days after he bought it.  Write a program that outputs `delicious` if he found it delicious, `safe` if he did not found it delicious but did not get a stomachache either, and `dangerous` if he got a stomachache.

Incorrect submission (verdict: Wrong Answer):
x,a,b = map(int,input().split())
if a-b <= 0:
    print('delicious')
elif a-b <= x:
    print('safe')
else:
    print('dangerous')

Fixed, accepted submission:
x,a,b = map(int,input().split())
if -a+b <= 0:
    print('delicious')
elif -a+b <= x:
    print('safe')
else:
    print('dangerous')
Problem:
Let's arrange a deck of cards. Your task is to sort totally n cards. A card consists of a part of a suit (S, H, C or D) and an number. Write a program which sorts such cards based on the following pseudocode:                 Partition(A, p, r) 1 x = A[r] 2 i = p-1 3 for j = p to r-1 4     do if A[j] <= x 5        then i = i+1 6            exchange A[i] and A[j]  7 exchange A[i+1] and A[r] 8 return i+1   Quicksort(A, p, r) 1 if p < r 2    then q = Partition(A, p, r) 3        run Quicksort(A, p, q-1) 4        run Quicksort(A, q+1, r)   Here, A is an array which represents a deck of cards and comparison operations are performed based on the numbers.  Your program should also report the stability of the output for the given input (instance). Here, 'stability of the output' means that: cards with the same value appear in the output in the same order as they do in the input (instance).

Incorrect submission (verdict: Wrong Answer):
def swap(A,i,j):
    A[i],A[j] = A[j],A[i]
    return A

def isStable(A):
    for i in range(1, len(A)):
        if A[i][1] == A[i-1][1]:
            if A[i][2] < A[i-1][2]:
                return False
    return True

def partition(A,p=0, r=None):
    if r is None:
        r = len(A)-1
    x = A[r]
    i = p-1
    for j in range(p,r):
        if A[j] <= x:
            i += 1
            swap(A,i,j)
    swap(A,i+1,r)
    return i+1

def quick(A,p=0,r=None):
    "16c"
    if r is None:
        r = len(A)-1
    if p < r:
        q = partition(A,p,r)
        quick(A,p,q-1)
        quick(A,q+1,r)

import sys
if __name__ == "__main__":
    n = int(input())
    A = []
    for i in range(n):
        card = sys.stdin.readline().split()
        A.append([card[0], int(card[1]), i])
    quick(A)
    if isStable(A):
        print("Stable")
    else:
        print("Not Stable")
    for card in A:
        print(card[0], card[1])

Fixed, accepted submission:
def swap(A,i,j):
    A[i],A[j] = A[j],A[i]
    return A

def isStable(A):
    for i in range(1, len(A)):
        if A[i][1] == A[i-1][1]:
            if A[i][2] < A[i-1][2]:
                return False
    return True

def partition(A,p=0, r=None):
    if r is None:
        r = len(A)-1
    x = A[r]
    i = p-1
    for j in range(p,r):
        if A[j][1] <= x[1]:
            i += 1
            swap(A,i,j)
    swap(A,i+1,r)
    return i+1

def quick(A,p=0,r=None):
    if r is None:
        r = len(A)-1
    if p < r:
        q = partition(A,p,r)
        quick(A,p,q-1)
        quick(A,q+1,r)

import sys
if __name__ == "__main__":
    n = int(sys.stdin.readline())
    A = []
    for i in range(n):
        card = sys.stdin.readline().split()
        A.append([card[0], int(card[1]), i])
    quick(A,0,n-1)
    if isStable(A):
        print("Stable")
    else:
        print("Not stable")
    for card in A:
        print(card[0], card[1])
Problem:
We call a 4-digit integer with three or more consecutive same digits, such as 1118, **good**.  You are given a 4-digit integer N. Answer the question: Is N **good**?

Incorrect submission (verdict: Wrong Answer):
x=list(input())
for i in range(10):
  if x.count(i)>=3:
    print("Yes")
    break
else:
  print("No")

Fixed, accepted submission:
x=list(input())
for i in range(10):
  if x.count(str(i))>=3 and x[1]==x[2]: 
    print("Yes")
    break
else:
  print("No")
Problem:
We will buy a product for N yen (the currency of Japan) at a shop.  If we use only 1000-yen bills to pay the price, how much change will we receive?  Assume we use the minimum number of bills required.

Incorrect submission (verdict: Wrong Answer):
N = int(input())

a = N//1000

print(N - 1000*a)

Fixed, accepted submission:
N = int(input())

a = N//1000

if 1000*a != N:
  print(1000*(a+1)-N)

else:
  print(0)
Problem:
There is a grid with H rows and W columns.  The square at the i-th row and j-th column contains a string S_{i,j} of length 5.  The rows are labeled with the numbers from 1 through H, and the columns are labeled with the uppercase English letters from `A` through the W-th letter of the alphabet.    Exactly one of the squares in the grid contains the string `snuke`. Find this square and report its location.  For example, the square at the 6-th row and 8-th column should be reported as `H6`.

Incorrect submission (verdict: Wrong Answer):
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
H, W = map(int, input().split())
S = [[] for i in range(H)]
for i in range(H):
    S[i] = list(input().split())
    
for i in range(H):
    for j in range(W):
        if S[i][j] == "Snuke":
            print(abc[j] + str(i))
            break

Fixed, accepted submission:
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
H, W = map(int, input().split())
S = [[] for i in range(H)]
for i in range(H):
    S[i] = list(input().split())
    
for i in range(H):
    for j in range(W):
        if S[i][j] == "snuke":
            print(abc[j] + str(i + 1))
            break
Problem:
There are N cities and M roads. The i-th road (1≤i≤M) connects two cities a_i and b_i (1≤a_i,b_i≤N) bidirectionally. There may be more than one road that connects the same pair of two cities. For each city, how many roads are connected to the city?

Incorrect submission (verdict: Wrong Answer):
N,M = map(int, input().split())
a = []
for i in range(M):
    tmp_l = map(int, input().split())
    for i in tmp_l:
        a.append(i)

itr = 0
count = 0
d = {}
print(list(range(1,N+1,1)))
print(a)
for j in list(range(1,N+1,1)):
    d[j] = 0

for k in a:
    d[k] = d[k] + 1

for o in list(range(1,N+1,1)):
    print(d[o])


Fixed, accepted submission:
N,M = map(int, input().split())
a = []
for i in range(M):
    tmp_l = map(int, input().split())
    for i in tmp_l:
        a.append(i)

itr = 0
count = 0
d = {}
for j in list(range(1,N+1,1)):
    d[j] = 0

for k in a:
    d[k] = d[k] + 1

for o in list(range(1,N+1,1)):
    print(d[o])
Problem:
In _K-city_ , there are n streets running east-west, and m streets running north-south. Each street running east-west and each street running north-south cross each other. We will call the smallest area that is surrounded by four streets a block. How many blocks there are in K-city?

Incorrect submission (verdict: Wrong Answer):
string=input('')
first=string[0]
last=string[len(string)-1]
mid=str(len(string[1:len(string)-1]))
print(first+mid+last)

Fixed, accepted submission:
n, m = (int(i) for i in input().split())
print((n-1)*(m-1))
Problem:
You are given N integers; the i-th of them is A_i. Find the maximum possible sum of the absolute differences between the adjacent elements after arranging these integers in a row in any order you like.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = [int(input()) for _ in range(n)]
a.sort()
a1 = a[:n//2]
a2 = a[n-1:n//2-1:-1]
ans = 0
if n%2==0:
  a2 += [a1[-1]]
for i in range(n//2):
  ans += a2[i]+a2[i+1]-a1[i]*2
print(ans)

Fixed, accepted submission:
n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
if n%2:
  s1 = l[:(n-1)//2]
  b1 = l[(n-1)//2:]
  t1 = sum(b1)*2 - sum(s1)*2 -sum(b1[:2])
  s2 = l[:(n+1)//2]
  b2 = l[(n+1)//2:]
  t2 = sum(b2)*2 - sum(s2)*2 + sum(s2[-2:])
  t = max(t1,t2)
else:
  s = l[:n//2]
  b = l[n//2:]
  t = sum(b)*2 - sum(s)*2 -b[0] + s[-1]
print(t)
Problem:
Today is August 24, one of the five Product Days in a year.  A date m-d (m is the month, d is the date) is called a Product Day when d is a two-digit number, and all of the following conditions are satisfied (here d_{10} is the tens digit of the day and d_1 is the ones digit of the day):    * d_1 \geq 2   * d_{10} \geq 2   * d_1 \times d_{10} = m  Takahashi wants more Product Days, and he made a new calendar called Takahashi Calendar where a year consists of M month from Month 1 to Month M, and each month consists of D days from Day 1 to Day D.  In Takahashi Calendar, how many Product Days does a year have?

Incorrect submission (verdict: Wrong Answer):
def seki_day(m, d):
    d10 = d // 10
    d1 = d - d10 * 10

    if d1 >= 2 and m == d10 * d1:
        print(m, d)
        return 1
    else:
        return 0

M, D = [int(x) for x in input().split()]

count = 0
for m in range(1, M + 1):
    for d in range(22, D + 1):
        count += seki_day(m, d)

print(count)


Fixed, accepted submission:
def seki_day(m, d):
    d10 = d // 10
    d1 = d - d10 * 10

    if d1 >= 2 and m == d10 * d1:
        return 1
    else:
        return 0

M, D = [int(x) for x in input().split()]

count = 0
for m in range(1, M + 1):
    for d in range(22, D + 1):
        count += seki_day(m, d)

print(count)
Problem:
We have N sticks with negligible thickness. The length of the i-th stick is A_i.  Snuke wants to select four different sticks from these sticks and form a rectangle (including a square), using the sticks as its sides. Find the maximum possible area of the rectangle.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
vals = list(map(int, input().split()))
d= {}
a = [0, 0]

for i in range(n):
    if(vals[i] in d.keys()):
        d[vals[i]] += 1
    else:
        d[vals[i]] = 1

print(d)

for i in d.keys():
    if(d[i] >= 4):
        a.append(i)
        a.append(i)
    elif(d[i] >= 2):
        a.append(i)
a.sort()

print(a[-1]*a[-2])

Fixed, accepted submission:
n=int(input())
a=[int(x) for x in input().split()]
a.sort()
lar=sec=i=0
while(i<n-1):
    if a[i]==a[i+1]:
        i+=1
        if a[i]>lar:
            sec=lar
            lar=a[i]
        elif a[i]>sec:
             sec=a[i]
    i+=1
print(lar*sec)
Problem:
Rng is preparing a problem set for a qualification round of CODEFESTIVAL.  He has N candidates of problems. The difficulty of the i-th candidate is D_i.  There must be M problems in the problem set, and the difficulty of the i-th problem must be T_i. Here, one candidate of a problem cannot be used as multiple problems.  Determine whether Rng can complete the problem set without creating new candidates of problems.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
a = [int(i) for i in input().split()]
M = int(input())
b = [int(i) for i in input().split()]
a.sort()
b.sort()
p=0
for i in range (len(b)):
    for j in range(len(a)):
        if b[i] == a[j]:
            a = a[j+1:N]
            break
        else:
            if j ==len(a)-1:
                print("No")
                p =1
                break
    if p ==1:
        break    
    if i == len(b)-1:
        print("Yes")

Fixed, accepted submission:
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))
d_dict = {}
for d in D:
    if d not in d_dict:
        d_dict[d] = 0
    d_dict[d] += 1
 
count = 0
for t in T:
    if t in d_dict and d_dict[t] > 0:
        d_dict[t] -= 1
        count += 1
if count == M:
    print("YES")
else:
    print("NO")
Problem:
Takahashi wants to gain muscle, and decides to work out at AtCoder Gym.  The exercise machine at the gym has N buttons, and exactly one of the buttons is lighten up. These buttons are numbered 1 through N. When Button i is lighten up and you press it, the light is turned off, and then Button a_i will be lighten up. It is possible that i=a_i. When Button i is not lighten up, nothing will happen by pressing it.  Initially, Button 1 is lighten up. Takahashi wants to quit pressing buttons when Button 2 is lighten up.  Determine whether this is possible. If the answer is positive, find the minimum number of times he needs to press buttons.

Incorrect submission (verdict: Wrong Answer):
import sys
N = int(input())
a = []
for i in range(N):
    a.append(int(input()))

ls = []
cur = a[0]
ans = 0
while not cur in ls:
    ls.append(cur)
    cur = a[cur-1]
    ans += 1
    if cur == 2:
        print(ans)
print(-1)

Fixed, accepted submission:
# 2019/6/25
import sys
N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
if not 2 in a:
    print(-1)
    sys.exit()
s = set()
cur = 1
ans = 0
while not cur in s:
    if a[cur-1] == 2:
        print(ans+1)
        sys.exit()
    else:
        s.add(cur)
        cur = a[cur-1]
        ans += 1
print(-1)
Problem:
You are given strings s and t, consisting of lowercase English letters. You will create a string s' by freely rearranging the characters in s. You will also create a string t' by freely rearranging the characters in t. Determine whether it is possible to satisfy s' < t' for the lexicographic order.

Incorrect submission (verdict: Wrong Answer):
s = ''.join(sorted(list(input())))
t = ''.join(sorted(list(input()), reverse=True))

print(s)
if s < t:
    print('Yes')
else:
    print('No')

Fixed, accepted submission:
s = ''.join(sorted(list(input())))
t = ''.join(sorted(list(input()), reverse=True))

if s < t:
    print('Yes')
else:
    print('No')
Problem:
Takahashi has a deposit of 100 yen (the currency of Japan) in AtCoder Bank.  The bank pays an annual interest rate of 1 % compounded annually. (A fraction of less than one yen is discarded.)  Assuming that nothing other than the interest affects Takahashi's balance, in how many years does the balance reach X yen or above for the first time?

Incorrect submission (verdict: Wrong Answer):
x = (int)(input())

year = 0
sum = 100
while sum <= x:
    year = year + 1
    sum = (int)(sum * 101 / 100)

print("{}".format(year))

Fixed, accepted submission:
x = (int)(input())

year = 0
sum = 100
while sum < x:
    year = year + 1
    sum = (int)(sum * 101 / 100)

print("{}".format(year))
Problem:
An elementary school student Takahashi has come to a variety store.  He has two coins, A-yen and B-yen coins (yen is the currency of Japan), and wants to buy a toy that costs C yen. Can he buy it?  Note that he lives in Takahashi Kingdom, and may have coins that do not exist in Japan.

Incorrect submission (verdict: Wrong Answer):
A,B,C = map(int,input().split())
if A +B >= C:
    print("YES")
else:
    print("NO")

Fixed, accepted submission:
A,B,C = map(int,input().split())
if A +B >= C:
    print("Yes")
else:
    print("No")
Problem:
Snuke lives at position x on a number line. On this line, there are two stores A and B, respectively at position a and b, that offer food for delivery.  Snuke decided to get food delivery from the closer of stores A and B. Find out which store is closer to Snuke's residence.  Here, the distance between two points s and t on a number line is represented by |s-t|.

Incorrect submission (verdict: Wrong Answer):
x,a,b=map(int,input().split())
print(min(abs(x-a),abs(x-b)))

Fixed, accepted submission:
x,a,b=map(int,input().split())
print("BA"[abs(x-a)<abs(x-b)])
Problem:
Iroha has a sequence of N strings S_1, S_2, ..., S_N. The length of each string is L.  She will concatenate all of the strings in some order, to produce a long string.  Among all strings that she can produce in this way, find the lexicographically smallest one.  Here, a string s=s_1s_2s_3...s_n is _lexicographically smaller_ than another string t=t_1t_2t_3...t_m if and only if one of the following holds:    * There exists an index i(1≦i≦min(n,m)), such that s_j = t_j for all indices j(1≦j<i), and s_i<t_i.   * s_i = t_i for all integers i(1≦i≦min(n,m)), and n<m.

Incorrect submission (verdict: Wrong Answer):
a=input()
b=[]
for i in range(int(a[0])):
  b.append(input())

f=sorted(b)  

for i in range(int(a[0])):
  print(f[i],end='')

Fixed, accepted submission:
a,b=map(int,input().split())
c=[]

for i in range(a):
  c.append(input())

d=sorted(c)  
print(''.join(d))
Problem:
Two children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second. The other child is now at coordinate B, and she can travel the distance of W per second.  He can catch her when his coordinate is the same as hers. Determine whether he can catch her within T seconds (including exactly T seconds later). We assume that both children move optimally.

Incorrect submission (verdict: Wrong Answer):
A,V = [int(i) for i in input().split() ]
B,W = [int(i) for i in input().split() ]
T = int(input()) 

print ( "Yes" if A+(V*T) >= B+(W*T) else "No" )

Fixed, accepted submission:
A,V = [int(i) for i in input().split() ]
B,W = [int(i) for i in input().split() ]
T = int(input()) 

print ("YES" if V-W > 0 and abs(A-B) / (V-W) <= T else "NO" )
Problem:
E869120 found a chest which is likely to contain treasure.   However, the chest is locked. In order to open it, he needs to enter a string S consisting of lowercase English letters.   He also found a string S', which turns out to be the string S with some of its letters (possibly all or none) replaced with `?`.  One more thing he found is a sheet of paper with the following facts written on it:    * Condition 1: The string S contains a string T as a contiguous substring.   * Condition 2: S is the lexicographically smallest string among the ones that satisfy Condition 1.  Print the string S.   If such a string does not exist, print `UNRESTORABLE`.

Incorrect submission (verdict: Wrong Answer):
S,T=input(),input()
m=len(S)

for i in range(len(T)-m+1):
 if all(c in"?"+d for c,d in zip(S[-i-m:],T)):
     S=S.replace("?","a")
     print(S[:-i-m]+T+S[-i:])
     quit()
print("UNRESTORABLE")

Fixed, accepted submission:
S,T=input(),input();l,m=len(S),len(T)
for i in range(l-m+1):
 if all(c in"?"+d for c,d in zip(S[-i-m:],T)):S=S.replace("?","a");print(S[:-i-m]+T+S[l-i:]);quit()
print("UNRESTORABLE")
Problem:
It is September 9 in Japan now.  You are given a two-digit integer N. Answer the question: Is 9 contained in the decimal notation of N?

Incorrect submission (verdict: Wrong Answer):
n = input()
if "9" in n:
  print("YES")
else:
  print("NO")

Fixed, accepted submission:
n = input()
if "9" in n:
  print("Yes")
else:
  print("No")