https://www.codechef.com/TNP52021/problems/TNP504

PROBLEM LINK:

https://www.codechef.com/TNP52021/problems/TNP504
Practice
Author: Setter’s name
Tester: Tester’s name
Editorialist: Editorialist’s name
DIFFICULTY : EASY

PREREQUISITES:

Nill

PROBLEM:

It is free time in school and heavy rain outside. So students have to sit in class and wait for 1 hour for next period. Here two friends Aaron and Ben play the Rock Paper Scissors game. You are there friend and need to determine who wins. Both players can choose moves from the set {R,P,S}. The game is a draw if both players choose the same item.
The winning rules of RPS are given below: Rock crushes scissor Scissor cuts paper Paper envelopes rock

SOLUTION:

try:
a=[] #python 3
t=int(input())
for i in range(t):
s=input()
if s[0]==“S” and s[1]==“R”:
a.append(“B”)
elif s[0]==“R” and s[1]==“S”:
a.append(“A”)
elif s[0]==“S” and s[1]==“P”:
a.append(“A”)
elif s[0]==“P” and s[1]==“S”:
a.append(“B”)
elif s[0]==“P” and s[1]==“R”:
a.append(“A”)
elif s[0]==“R” and s[1]==“P”:
a.append(“B”)
else:
a.append(“DRAW”)
for j in a:
print(j)
except:
print(“DRAW”)

Your logic is correct. The problem is that while assessing your code , codechef expects the first line to be input and second one to be its output.
you don’t have to print all outputs together.
CC
If your program produces the above output, then it will be accepted.
Hope this helps