I am trying the kattis problem ABC (https://open.kattis.com/problems/abc). It works fine on my local compiler, but when I submit, I can't pass all the cases. Can someone have look on my code below though it is bit massy and help me where I am failing:
integer_input = input().split(" ")
character_input = input().upper()
#sorting
intCopy = integer_input
for i in range(len(integer_input)-1):
for j in range(1, len(integer_input)):
if int(integer_input[i]) > int(integer_input[j]):
intCopy[i], intCopy[j] = intCopy[j], intCopy[i]
num = []
for i in character_input:
if i == "A":
num += intCopy[0]
elif i == "B":
num += intCopy[1]
elif i == "C":
num += intCopy[2]
for j in num:
print(int(j), end=" ")