TnT/CodeNet4Repair huggingface dataset:
Problem:
Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right. We will call the arrangement of the poles _beautiful_ if the tops of the poles lie on the same line, that is, b-a = c-b.  Determine whether the arrangement of the poles is beautiful.

Incorrect submission (verdict: Wrong Answer):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    a, b, c = list(map(int, sys.stdin.readline().split()))
    print('Yes' if b - a == c - b else 'No')


if __name__ == '__main__':
    main()


Fixed, accepted submission:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    a, b, c = list(map(int, sys.stdin.readline().split()))
    print('YES' if b - a == c - b else 'NO')


if __name__ == '__main__':
    main()
Problem:
A balance scale tips to the left if L>R, where L is the total weight of the masses on the left pan and R is the total weight of the masses on the right pan. Similarly, it balances if L=R, and tips to the right if L<R.  Takahashi placed a mass of weight A and a mass of weight B on the left pan of a balance scale, and placed a mass of weight C and a mass of weight D on the right pan.  Print `Left` if the balance scale tips to the left; print `Balanced` if it balances; print `Right` if it tips to the right.

Incorrect submission (verdict: Wrong Answer):
# -*- coding: utf-8 -*-
"""
Created on Mon Mar  4 15:01:58 2019

@author: kaned
"""
A,B,C,D=map(int,input().split())
L=A+B
R=C+D
if L<R:
    print('Left')
elif L>R:
    print('Right')
else:
    print("Balanced")


Fixed, accepted submission:
# -*- coding: utf-8 -*-
"""
Created on Mon Mar  4 15:01:58 2019

@author: kaned
"""
A,B,C,D=map(int,input().split())
L=A+B
R=C+D
if L>R:
    print('Left')
elif L<R:
    print('Right')
else:
    print("Balanced")
Problem:
Takahashi bought a piece of apple pie at ABC Confiserie. According to his memory, he paid N yen (the currency of Japan) for it.  The consumption tax rate for foods in this shop is 8 percent. That is, to buy an apple pie priced at X yen before tax, you have to pay X \times 1.08 yen (rounded down to the nearest integer).  Takahashi forgot the price of his apple pie before tax, X, and wants to know it again. Write a program that takes N as input and finds X. We assume X is an integer.  If there are multiple possible values for X, find any one of them. Also, Takahashi's memory of N, the amount he paid, may be incorrect. If no value could be X, report that fact.

Incorrect submission (verdict: Time Limit Exceeded):
import sys
N=int(input())
a=N//1.08
b=a*1.08
b=int(b)
if b==N:
  print(a)
  sys.exit()
while True:
  if b>N:
    a=a-1
    b=a*1.08
    b=int(b)
    if b<N:
      print(":(")
      sys.exit()
    elif b==N:
      print(a)
  elif  b<N:
    a=a+1
    b=a*1.08
    b=int(b)
    if b>N:
      print(":(")
      sys.exit()
    elif b==N:
      print(a)

Fixed, accepted submission:
import sys
N=int(input())
a=N//1.08
c=a+1
d=a-1
b=a*1.08
b=int(b)
if b==N:
  print(int(a))
  sys.exit()
elif int(c*1.08)==N:
  print(int(c))
elif int(d*1.08)==N:
  print(int(d))
else:
  print(":(")
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())
A = abs(x-a)
B = abs(x-b)
ans = [A, B]
print(min(ans))

Fixed, accepted submission:
x, a, b = map(int,input().split())
A = abs(x-a)
B = abs(x-b)
if A<B:
    print('A')
else:
    print('B')
Problem:
Let f(n) be the number of triples of integers (x,y,z) that satisfy both of the following conditions:    * 1 \leq x,y,z   * x^2 + y^2 + z^2 + xy + yz + zx = n  Given an integer N, find each of f(1),f(2),f(3),\ldots,f(N).

Incorrect submission (verdict: Time Limit Exceeded):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

def test(n):
    cnt = 0
    for i in range(1,100):
        for j in range(1,100):
            for k in range(1,100):
                if (i+j+k)**2 == n + (i*j + j*k + k*i):
                    cnt += 1 
    return cnt

for i in range(N):
    print(test(i+1))


Fixed, accepted submission:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

ans = [0 for _ in range(10050)]

for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
           v = (i+j+k)**2 - (i*j + j*k + k*i)
           if v < 10050:
            ans[v] += 1

for i in range(N):
    print(ans[i+1])
Problem:
You are given a grid with 2 rows and 3 columns of squares. The color of the square at the i-th row and j-th column is represented by the character C_{ij}.  Write a program that prints `YES` if this grid remains the same when rotated 180 degrees, and prints `NO` otherwise.

Incorrect submission (verdict: Wrong Answer):


import numpy as np

s=[input() for k in range(2)]
for i in range(3):
    if(s[0][i]!=s[1][2-i]):
        print("No")
        exit(0)
print("Yes")

Fixed, accepted submission:


import numpy as np

a=input()
b=input()[::-1]
if(a!=b):
    print("NO")
else:print("YES")
Problem:
Given is a tree G with N vertices. The vertices are numbered 1 through N, and the i-th edge connects Vertex a_i and Vertex b_i.  Consider painting the edges in G with some number of colors. We want to paint them so that, for each vertex, the colors of the edges incident to that vertex are all different.  Among the colorings satisfying the condition above, construct one that uses the minimum number of colors.

Incorrect submission (verdict: Wrong Answer):
from sys import stdin
from collections import defaultdict
from collections import deque

N = int(stdin.readline().rstrip())
adj = defaultdict(set)

for i in range(N-1):
    a,b = [int(x) for x in stdin.readline().rstrip().split()]
    adj[a].add(b)
    adj[b].add(a)
    
visited = [False]*(N+1)
color_edges = [0]*(N+1)
visit_p = deque()
visit_p.append((1,1))

while visit_p:
    node,color = visit_p.popleft()
    
    if visited[node]:
        continue
        
    color_edges[node] = color
    visited[node] = True
    
    cnt = 0
    for i in adj[node]:
        if visited[i]:
            continue
        cnt += 1
        if cnt == color:
            cnt += 1
        visit_p.append((i,cnt))
for i in color_edges[1:]:
    print(i)

Fixed, accepted submission:
from sys import stdin
from collections import defaultdict
from collections import deque
 
N = int(stdin.readline().rstrip())
adj = defaultdict(set)
edges = []

for i in range(N-1):
    a,b = [int(x) for x in stdin.readline().rstrip().split()]
    adj[a].add(b)
    adj[b].add(a)
    edges.append((a,b))
    
visited = [False]*(N+1)
color_edges = defaultdict(bool)
visit_p = deque()
visit_p.append((1,0))
 
while visit_p:
    node,color = visit_p.popleft()
    
    if visited[node]:
        continue
        
    visited[node] = True
    
    cnt = 0
    for i in adj[node]:
        if visited[i]:
            continue
        cnt += 1
        if cnt == color:
            cnt += 1
        color_edges[(node,i)] = cnt
        visit_p.append((i,cnt))
print(max(color_edges.values()))
for i in edges:
    if not color_edges[i]:
        print(color_edges[(i[1],i[0])])
    else:
        print(color_edges[i])
Problem:
Snuke is giving cookies to his three goats.  He has two cookie tins. One contains A cookies, and the other contains B cookies. He can thus give A cookies, B cookies or A+B cookies to his goats (he cannot open the tins).  Your task is to determine whether Snuke can give cookies to his three goats so that each of them can have the same number of cookies.

Incorrect submission (verdict: Wrong Answer):
a,b = map(int, input().split())
if a%3 == 0 or b%3 == 0 or a+b%3 == 0:
    print("Possible")
else:
    print("Impossible")

Fixed, accepted submission:
a,b = map(int, input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
    print("Possible")
else:
    print("Impossible")
Problem:
How many multiples of d are there among the integers between L and R (inclusive)?

Incorrect submission (verdict: Wrong Answer):
def a_number_of_multiples(l,r,d):
    r = r+1
    range_list = list(range(l,r))
    per_list = []
    for i in range_list:
        if i % d == 0:
            per_list.append(i)
        else:
            pass
    count_list = len(per_list)
    return count_list
  
  

Fixed, accepted submission:
l,r,d = map(int, input().split())
r = r+1
range_list = list(range(l,r))
per_list = []
for i in range_list:
    if i % d == 0:
        per_list.append(i)
    else:
        pass
print(len(per_list))
Problem:
Let's first write a program to calculate the score from a pair of input and output. You can know the total score by submitting your solution, or an official program to calculate a score is often provided for local evaluation as in this contest. Nevertheless, writing a score calculator by yourself is still useful to check your understanding of the problem specification. Moreover, the source code of the score calculator can often be reused for solving the problem or debugging your solution. So it is worthwhile to write a score calculator unless it is very complicated.

Incorrect submission (verdict: Wrong Answer):
# -*- coding: utf-8 -*-
import time
import numpy as np

start = time.time()
limit_time = 1.8


d = int(input())
c = [int(i) for i in input().split()]
s = [[int(i) for i in input().split()] for j in range(d)]

def point(t):
    result = 0
    map = {
        0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0,
        10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0,
        20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0
    }
    for i in range(d):
        comp = t[i] - 1
        day = i + 1
        map[comp] = day
        result = result + s[i][comp]
        for cc in range(26):
            result = result - c[cc] * (day - map[cc])
        print(result)
    return result

t = [int(input()) for i in range(d)]



Fixed, accepted submission:
# -*- coding: utf-8 -*-
import time
import numpy as np

start = time.time()
limit_time = 1.8


d = int(input())
c = [int(i) for i in input().split()]
s = [[int(i) for i in input().split()] for j in range(d)]

def point(t):
    result = 0
    map = {
        0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0,
        10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0,
        20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0
    }
    for i in range(d):
        comp = t[i] - 1
        day = i + 1
        map[comp] = day
        result = result + s[i][comp]
        for cc in range(26):
            result = result - c[cc] * (day - map[cc])
        print(result)
    return result

t = [int(input()) for i in range(d)]

point(t)
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):
a = input()
b = input()

aa = list(a)
bb = list(b)

aa.sort()
bb.sort()

S = "".join(aa)
T = "".join(bb)

if S < T:
    answer = "Yes"
    print(answer)
else:
    answer = "No"
    print(answer)

Fixed, accepted submission:

a = input()
b = input()

aa = list(a)
bb = list(b)

aa.sort()
bb.sort(reverse=True)


S = "".join(aa)
T = "".join(bb)

if S < T:
    answer = "Yes"
    print(answer)
else:
    answer = "No"
    print(answer)
Problem:
There are a total of A + B cats and dogs. Among them, A are known to be cats, but the remaining B are not known to be either cats or dogs.  Determine if it is possible that there are exactly X cats among these A + B animals.

Incorrect submission (verdict: Wrong Answer):
l = list(map(int,input().split()))
a,b,x = l[0],l[1],l[2]
print("Yes" if a<=x<=a+b else "No")

Fixed, accepted submission:
line = list(map(int,input().split()))
a,b,x=line[0],line[1],line[2]
if a <= x <= a+b:
    print("YES")
else:
    print("NO")
Problem:
Niwango created a playlist of N songs. The title and the duration of the i-th song are s_i and t_i seconds, respectively. It is guaranteed that s_1,\ldots,s_N are all distinct.  Niwango was doing some work while playing this playlist. (That is, all the songs were played once, in the order they appear in the playlist, without any pause in between.) However, he fell asleep during his work, and he woke up after all the songs were played. According to his record, it turned out that he fell asleep at the very end of the song titled X.  Find the duration of time when some song was played while Niwango was asleep.

Incorrect submission (verdict: Wrong Answer):
d = 0
a = int(input())
for i in range(a):
    b, c = map(str, input().split())
    c = int(c)
    d += c

print(d)


Fixed, accepted submission:
total = 0
a = int(input())
f = [];
g = [];
for i in range(a):
    b, c = map(str, input().split())
    c = int(c)
    f.append(b)
    g.append(c)
e = input()
h = f.index(e)
j = len(f)
for i in range(j-h-1):
    total += int(g[h+i+1])
print(total)
Problem:
Given is a rooted tree with N vertices numbered 1 to N. The root is Vertex 1, and the i-th edge (1 \leq i \leq N - 1) connects Vertex a_i and b_i.  Each of the vertices has a counter installed. Initially, the counters on all the vertices have the value 0.  Now, the following Q operations will be performed:    * Operation j (1 \leq j \leq Q): Increment by x_j the counter on every vertex contained in the subtree rooted at Vertex p_j.  Find the value of the counter on each vertex after all operations.

Incorrect submission (verdict: Wrong Answer):
n,q = map(int, input().split())
a = [0]*(n-1)
b = [0]*(n-1)
for i in range(n-1):
    a[i],b[i] = map(int, input().split())

p = [0]*q
x = [0]*q

for i in range(q):
    p[i],x[i] = map(int, input().split())

score = [0]*n

def down_tree(parent, add_score):
    global score
    judge_count = 0
    for i in range(q):
        if p[i]-1 == parent:
            add_score += x[i]
    for i in range(n-1):
        if a[i]-1 == parent:
            down_tree(b[i]-1, add_score)
            judge_count += 1

    score[parent] += add_score

    return 0

down_tree(0, 0)

print(score)

Fixed, accepted submission:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(200005)
n, q = map(int, input().split())

to = [[] for i in range(n+1)]


for i in range(n-1):
    a, b = map(int, input().split())
    to[a].append(b)
    to[b].append(a)

score = [0]*(n+1)
for i in range(q):
    p, x = map(int, input().split())
    score[p] += x


def down_tree(index, parent):
    for i in to[index]:
        if i == parent:
            continue
        score[i] += score[index]
        down_tree(i, index)



down_tree(1, 1)

print(' '.join(map(str, score[1:])))
Problem:
10^{10^{10}} participants, including Takahashi, competed in two programming contests. In each contest, all participants had distinct ranks from first through 10^{10^{10}}-th.  The _score_ of a participant is the product of his/her ranks in the two contests.  Process the following Q queries:    * In the i-th query, you are given two positive integers A_i and B_i. Assuming that Takahashi was ranked A_i-th in the first contest and B_i-th in the second contest, find the maximum possible number of participants whose scores are smaller than Takahashi's.

Incorrect submission (verdict: Wrong Answer):
import math

Q = int(input())

AB = []
for _ in range(Q) :
    a, b = map(int, input().split())
    AB.append((a, b))

for a, b in AB :
    if a == b :
        print(2 * a - 2)
    elif (a + 1) == b :
        print(2 * a - 2)
    else :
        C = int(math.sqrt(a * b))
        if C * (C + 1) >= a * b :
            print(2 * C - 2)
        else :
            print(2 * C - 1)


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

ans = []
for _ in range(Q):
    A, B = map(int, input().split())

    if A == B:
        ans.append(2 * A - 2)
        continue

    C = (A * B)**0.5
    D = int(C)

    if C.is_integer():
        D -= 1

    F = 2 * D - 1
    if D * (D + 1) >= A * B:
        F -= 1

    ans.append(F)

print(*ans, sep='\n')
Problem:
You are given three strings A, B and C. Check whether they form a _word chain_.  More formally, determine whether both of the following are true:    * The last character in A and the initial character in B are the same.   * The last character in B and the initial character in C are the same.  If both are true, print `YES`. Otherwise, print `NO`.

Incorrect submission (verdict: Wrong Answer):
def solve():
    a, b, c = map(str, input().split())
    if a[-1] == b[0] and b[-1] == c[0]:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)

if __name__ == '__main__':
   solve()   

Fixed, accepted submission:
def solve():
    a, b, c = map(str, input().split())
    if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
        ans = "YES"
    else:
        ans = "NO"

    print(ans)

if __name__ == '__main__':
   solve()
Problem:
We have a grid with H rows and W columns, where all the squares are initially white.  You will perform some number of painting operations on the grid. In one operation, you can do one of the following two actions:    * Choose one row, then paint all the squares in that row black.   * Choose one column, then paint all the squares in that column black.  At least how many operations do you need in order to have N or more black squares in the grid? It is guaranteed that, under the conditions in Constraints, having N or more black squares is always possible by performing some number of operations.

Incorrect submission (verdict: Wrong Answer):
H,W,N = [int(input()) for _ in range(3)]
print(N/max(H,W)+1)

Fixed, accepted submission:
# -*- coding: utf-8 -*-

H,W,N = [int(input()) for _ in range(3)]

ans = N/max(H,W) if N%max(H,W)==0 else N/max(H,W)+1
print(int(ans))
Problem:
We will call a string that can be obtained by concatenating two equal strings an _even_ string. For example, `xyzxyz` and `aaaaaa` are even, while `ababab` and `xyzxy` are not.  You are given an even string S consisting of lowercase English letters. Find the length of the longest even string that can be obtained by deleting one or more characters from the end of S. It is guaranteed that such a non-empty string exists for a given input.

Incorrect submission (verdict: Wrong Answer):
s=input()
ans=0
for i in range(len(s)):
  if s[:i+1]==s[i+1:i*2+2]:
    ans+=1
  else:
    break
print(ans)

Fixed, accepted submission:
s=input()
ans=0
for i in range(len(s)//2):
  if s[:i]==s[i:2*i]:
    ans=2*i
print(ans)
Problem:
Write a program which reads a $n \times m$ matrix $A$ and a $m \times l$ matrix $B$, and prints their product, a $n \times l$ matrix $C$. An element of matrix $C$ is obtained by the following formula:  \\[ c_{ij} = \sum_{k=1}^m a_{ik}b_{kj} \\]  where $a_{ij}$, $b_{ij}$ and $c_{ij}$ are elements of $A$, $B$ and $C$ respectively.

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

for i in range(a):A.append(list(map(int,input().split())))
for i in range(b):B.append(list(map(int,input().split())))

for A_r in A:
  print("".join(map(str,[sum(x*y for x,y in zip(A_r,[B_r[k] for B_r in B])) for k in range(1)])))


Fixed, accepted submission:
n,m,l = map(int,input().split())
A=[]
B=[]
for i in range(n): A.append(list(map(int,input().split())))
for j in range(m): B.append(list(map(int,input().split())))
for A_r in A:
    print(" ".join(map(str,[sum([x*y for x,y in zip(A_r,[B_r[k] for B_r in B])]) for k in range(l)])))
Problem:
Find the sum of the integers between 1 and N (inclusive), whose sum of digits written in base 10 is between A and B (inclusive).

Incorrect submission (verdict: Wrong Answer):
n,a,b  = map(int,input().split())
ans = 0
for i in range(1,n+1):
  d = i
  s=0
  while d:
    r = d %10
    d = int(d/10)
    s+=r
  if a<=s<=b:
    ans += 1
print(ans)

Fixed, accepted submission:
n,a,b  = map(int,input().split())
ans = 0
for i in range(1,n+1):
  d = i
  s = 0
  while d:
    s +=  d % 10
    d = int(d/10)
  if a<=s<=b:
    ans += i
print(ans)
Problem:
There are a total of A + B cats and dogs. Among them, A are known to be cats, but the remaining B are not known to be either cats or dogs.  Determine if it is possible that there are exactly X cats among these A + B animals.

Incorrect submission (verdict: Wrong Answer):
A,B,X = map(int,input().split())
ans = X-A
if (ans<B)and(ans>0):
    print("Yes")
else:
    print("No")

Fixed, accepted submission:
A,B,X = map(int,input().split())
ans = X-A
if (ans<=B)&(ans>=0):
    print("YES")
else:
    print("NO")
Problem:
In the online judge system, a judge file may include multiple datasets to check whether the submitted program outputs a correct answer for each test case. This task is to practice solving a problem with multiple datasets.  Write a program which reads an integer x and print it as is. Note that multiple datasets are given for this problem.

Incorrect submission (verdict: Wrong Answer):
i = 1
while True:
    inputted_str = input()
    if inputted_str != "0": 
        print("Case {}: {}".format(i, inputted_str))
    else:
        break

Fixed, accepted submission:
i = 1
while True:
    inputted_str = int(input())
    if inputted_str != 0:
        print("Case {}: {}".format(i, inputted_str))
        i += 1
    else:
        break
Problem:
Write a program of the Insertion Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the following pseudocode:                 for i = 1 to A.length-1     key = A[i]     /* insert A[i] into the sorted sequence A[0,...,j-1] */     j = i - 1     while j >= 0 and A[j] > key         A[j+1] = A[j]         j--     A[j+1] = key   Note that, indices for array elements are based on 0-origin.  To illustrate the algorithms, your program should trace intermediate result for each step.

Incorrect submission (verdict: Wrong Answer):
def sort(l):
    for i in range(len(l)) :
        key = l[i]
        j = i-1
        while i-1>=0 & l[j]>key:
            l[j+1] = l[j]
            j -= 1
        l[j+1] = key
        print(l)

n = int(input())
line = list(map(int,input().split(" ")))

sort(line)

Fixed, accepted submission:
def inSort(n):
    print(" ".join(list(map(str,n))))
    for i in range(1,len(n)):
        v = n[i]
        j = i-1
        while j>=0 and n[j]>v:
            n[j+1]=n[j]
            j-=1
        n[j+1]=v
        print(" ".join(list(map(str,n))))
    
A=input()
N=list(map(int,input().split()))
inSort(N)
Problem:
You are given three words s_1, s_2 and s_3, each composed of lowercase English letters, with spaces in between. Print the acronym formed from the uppercased initial letters of the words.

Incorrect submission (verdict: Wrong Answer):
a,b,c=input().split()
A = a.upper()
B = b.upper()
C = c.upper()
print(A[0]+B[0]+c[0])

Fixed, accepted submission:
a,b,c=input().split()
A = a.upper()
B = b.upper()
C = c.upper()
print(A[0]+B[0]+C[0])